Re: [PATCH] Stowaway 2.6.17.1
From: Dmitry Torokhov
Date: Sun Aug 06 2006 - 22:25:48 EST
On Saturday 05 August 2006 15:52, Marek VaÅut wrote:
> Hi,
> this patch adds support for stowaway and stowaway compatible (eg. dicota
> inutPDA) serial keyboards. I made it on kernel 2.6.16, but it applies cleanly
> on 2.6.17.1 too. I tested it on palm zire71 and friend reported me that it
> works on palm tungsten T3.
>
Hi,
Looks pretty good, I have a question though:
> + if (data < 0x80) {
> + /* invalid scan codes are probably the init sequence, so we ignore them */
> + if (skbd->keycode[data & SKBD_KEY]) {
> + input_regs(skbd->dev, regs);
> + input_report_key(skbd->dev, skbd->keycode[data & SKBD_KEY], 1);
> + input_sync(skbd->dev);
> + }
> + else if (data == 0xe7) /* end of init sequence */
> + printk(KERN_INFO "input: %s on %s\n", skbd->dev->name, serio->phys);
How does "init sequence" gets here? Normally inputattach initializes
hardware and then creates proper serio port...
> + err = serio_open(serio, drv);
> + if (err)
> + goto fail;
> +
> + input_register_device(skbd->dev);
> + return 0;
You need to handle errors from input_register_device() too.
--
Dmitry
-
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/