lkml.org 
[lkml]   [2006]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Liyitec PS/2 touch panel driver [PATCH]
    >Shaun Jackman wrote:
    >I've written an input driver for the Liyitec PS/2 touch panel. The
    >patch follows. As this is my first input driver, I'd appreciate any
    >feedback.
    >
    >Please cc me in your reply. Cheers,
    >Shaun
    [snip]
    >+static irqreturn_t liyitec_interrupt(struct serio *serio,
    >+ unsigned char data, unsigned int flags, struct pt_regs *regs)
    >+{
    >+ struct liyitec *liyitec = serio_get_drvdata(serio);
    >+
    >+ if (liyitec->count < 0) {
    >+ if (data != LIYITEC_RET_ACK)
    >+ printk(KERN_DEBUG "liyitec: expected ACK: 0x%02x\n", data);
    >+ } else
    >+ liyitec->data[liyitec->count] = data;
    >+ liyitec->count++;
    >+
    >+ if (liyitec->count == 1 && !(data & LIYITEC_SYNC)) {
    >+ printk(KERN_DEBUG "liyitec: unsynchronized data: 0x%02x\n", data);
    It would be great to use dev_*() rather than printks.
    dev_dbg(&serio->dev, "unsynchronized data: 0x%02x\n", data);
    for instance.

    regards,
    --
    Jiri Slaby www.fi.muni.cz/~xslaby
    ~\-/~ jirislaby@gmail.com ~\-/~
    B67499670407CE62ACC8 22A032CC55C339D47A7E
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-02-01 02:06    [W:0.023 / U:29.364 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site