lkml.org 
[lkml]   [2007]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: usb hid: reset NumLock
On Sun, 1 Apr 2007, Pete Zaitcev wrote:

> diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
> index ef09952..7338e81 100644
> --- a/drivers/usb/input/hid-core.c
> +++ b/drivers/usb/input/hid-core.c
> @@ -548,6 +548,28 @@ void usbhid_init_reports(struct hid_device *hid)
> warn("timeout initializing reports");
> }
>
> +/*
> + * Reset LEDs which BIOS might have left on.
> + */
> +static int hid_find_field_early(struct hid_device *hid, unsigned int page,
> + unsigned int hid_code, struct hid_field **field);

Hi Pete,

could you please change the order of the two functions, so that you
don't have to put the forward declaration here?

> + /*
> + * Just reset Num Lock for now.
> + * This is called for non-keyboard devices too, so no printk if field
> + * is not found.
> + */

I'd say this is a little bit overcommented.

> The main reason is, I have a USB-to-PS/2 adapter where early acces to
> LEDs does not work. Apparently, it is still initializing the PS/2 part
> when it reports to USB that it's ready, and needs a delay. So, I figured
> that I may be breaking some odd devices. Some may crash or whatnot. This
> is why I asked Stuart to get me VID/PID for involved keyboards.

Fair enough, thanks.

Besides the trivial nitpicks above, I think that this fixed version is
fine. So as soon as you have the VIDs and PIDs of the hardware which
requires this, could you please update the patch and send it to me again?

Thanks,

--
Jiri Kosina
-
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: 2007-04-02 18:23    [W:0.063 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site