Re: usb hid: reset NumLock

From: Jiri Kosina
Date: Tue Apr 03 2007 - 04:48:17 EST


On Mon, 2 Apr 2007, Pete Zaitcev wrote:

> How about this?

Looks quite fine to me.

But in case that Dmitry's patch "Input: add generic suspend and resume for
uinput devices" fixes your issue too, I wouldn't merge it as it won't be
needed. Could you please let me know?

> @@ -947,6 +989,8 @@ static const struct hid_blacklist {
>
> { USB_VENDOR_ID_CIDC, 0x0103, HID_QUIRK_IGNORE },
>
> + { USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS },
> +

As this quirk is only needed once in the initialization method, we could
probably get rid of it and just put and explicit test for PID and VID
there (with apropriate comment). We can't afford wasting quirk entries, as
we are slowly running out of them.

Depends on whether this is going to be needed for > 1 PID.

> I wasn't sure where to place the function, so I just put it above its
> user, to signify that it's special-casing. Also, it's unclear where to
> put the quirk entry and defines. There's a comment saying that they are
> sorted alphabetically by quirk, but apparently the order was violated
> with more recent additions.

Yep, the blacklist is ugly. I have a patch moving it to the proper place
and rearranging it to be sorted again, queued for 2.6.22.

Thanks,

--
Jiri Kosina
-
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/