Re: Liyitec PS/2 touch panel driver [PATCH]

From: Jiri Slaby
Date: Tue Jan 31 2006 - 20:02:13 EST


>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@xxxxxxxxx ~\-/~
B67499670407CE62ACC8 22A032CC55C339D47A7E
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/