Commit 03090cc7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull HID fixes from Jiri Kosina:

 - fixes for various drivers which assume that a HID device is on USB
   transport, but that might not necessarily be the case, as the device
   can be faked by uhid. (Greg, Benjamin Tissoires)

 - fix for spurious wakeups on certain Lenovo notebooks (Thomas
   Weißschuh)

 - a few other device-specific quirks

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: Ignore battery for Elan touchscreen on Asus UX550VE
  HID: intel-ish-hid: ipc: only enable IRQ wakeup when requested
  HID: google: add eel USB id
  HID: add USB_HID dependancy to hid-prodikeys
  HID: add USB_HID dependancy to hid-chicony
  HID: bigbenff: prevent null pointer dereference
  HID: sony: fix error path in probe
  HID: add USB_HID dependancy on some USB HID drivers
  HID: check for valid USB device for many HID drivers
  HID: wacom: fix problems when device is not a valid USB device
  HID: add hid_is_usb() function to make it simpler for USB detection
  HID: quirks: Add quirk for the Microsoft Surface 3 type-cover
parents 2990c89d 14902f89
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -207,14 +207,14 @@ config HID_CHERRY

config HID_CHICONY
	tristate "Chicony devices"
	depends on HID
	depends on USB_HID
	default !EXPERT
	help
	Support for Chicony Tactical pad and special keys on Chicony keyboards.

config HID_CORSAIR
	tristate "Corsair devices"
	depends on HID && USB && LEDS_CLASS
	depends on USB_HID && LEDS_CLASS
	help
	Support for Corsair devices that are not fully compliant with the
	HID standard.
@@ -245,7 +245,7 @@ config HID_MACALLY

config HID_PRODIKEYS
	tristate "Prodikeys PC-MIDI Keyboard support"
	depends on HID && SND
	depends on USB_HID && SND
	select SND_RAWMIDI
	help
	Support for Prodikeys PC-MIDI Keyboard device support.
@@ -560,7 +560,7 @@ config HID_LENOVO

config HID_LOGITECH
	tristate "Logitech devices"
	depends on HID
	depends on USB_HID
	depends on LEDS_CLASS
	default !EXPERT
	help
@@ -951,7 +951,7 @@ config HID_SAITEK

config HID_SAMSUNG
	tristate "Samsung InfraRed remote control or keyboards"
	depends on HID
	depends on USB_HID
	help
	Support for Samsung InfraRed remote control or keyboards.

+2 −4
Original line number Diff line number Diff line
@@ -1028,8 +1028,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
	if (drvdata->quirks & QUIRK_IS_MULTITOUCH)
		drvdata->tp = &asus_i2c_tp;

	if ((drvdata->quirks & QUIRK_T100_KEYBOARD) &&
	    hid_is_using_ll_driver(hdev, &usb_hid_driver)) {
	if ((drvdata->quirks & QUIRK_T100_KEYBOARD) && hid_is_usb(hdev)) {
		struct usb_interface *intf = to_usb_interface(hdev->dev.parent);

		if (intf->altsetting->desc.bInterfaceNumber == T100_TPAD_INTF) {
@@ -1057,8 +1056,7 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
		drvdata->tp = &asus_t100chi_tp;
	}

	if ((drvdata->quirks & QUIRK_MEDION_E1239T) &&
	    hid_is_using_ll_driver(hdev, &usb_hid_driver)) {
	if ((drvdata->quirks & QUIRK_MEDION_E1239T) && hid_is_usb(hdev)) {
		struct usb_host_interface *alt =
			to_usb_interface(hdev->dev.parent)->altsetting;

+1 −1
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ static void bigben_worker(struct work_struct *work)
		struct bigben_device, worker);
	struct hid_field *report_field = bigben->report->field[0];

	if (bigben->removed)
	if (bigben->removed || !report_field)
		return;

	if (bigben->work_led) {
+3 −0
Original line number Diff line number Diff line
@@ -114,6 +114,9 @@ static int ch_probe(struct hid_device *hdev, const struct hid_device_id *id)
{
	int ret;

	if (!hid_is_usb(hdev))
		return -EINVAL;

	hdev->quirks |= HID_QUIRK_INPUT_PER_APP;
	ret = hid_parse(hdev);
	if (ret) {
+6 −1
Original line number Diff line number Diff line
@@ -553,7 +553,12 @@ static int corsair_probe(struct hid_device *dev, const struct hid_device_id *id)
	int ret;
	unsigned long quirks = id->driver_data;
	struct corsair_drvdata *drvdata;
	struct usb_interface *usbif = to_usb_interface(dev->dev.parent);
	struct usb_interface *usbif;

	if (!hid_is_usb(dev))
		return -EINVAL;

	usbif = to_usb_interface(dev->dev.parent);

	drvdata = devm_kzalloc(&dev->dev, sizeof(struct corsair_drvdata),
			       GFP_KERNEL);
Loading