Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID fixes from Jiri Kosina:

- Wacom 2nd-gen Intuos Pro large Y axis handling fix from Jason Gerecke

- fix for hibernation in Intel ISH driver, from Even Xu

- crash fix for hid-steam driver, from Rodrigo Rivas Costa

- new device ID addition to google-hammer driver

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large
HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation
HID: steam: use hid_device.driver_data instead of hid_set_drvdata()
HID: google: Add support for whiskers

+23 -20
+2
drivers/hid/hid-google-hammer.c
··· 124 124 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_STAFF) }, 125 125 { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, 126 126 USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_WAND) }, 127 + { HID_DEVICE(BUS_USB, HID_GROUP_GENERIC, 128 + USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_WHISKERS) }, 127 129 { } 128 130 }; 129 131 MODULE_DEVICE_TABLE(hid, hammer_devices);
+1
drivers/hid/hid-ids.h
··· 452 452 #define USB_DEVICE_ID_GOOGLE_TOUCH_ROSE 0x5028 453 453 #define USB_DEVICE_ID_GOOGLE_STAFF 0x502b 454 454 #define USB_DEVICE_ID_GOOGLE_WAND 0x502d 455 + #define USB_DEVICE_ID_GOOGLE_WHISKERS 0x5030 455 456 456 457 #define USB_VENDOR_ID_GOTOP 0x08f2 457 458 #define USB_DEVICE_ID_SUPER_Q2 0x007f
+5 -5
drivers/hid/hid-steam.c
··· 573 573 574 574 static int steam_client_ll_parse(struct hid_device *hdev) 575 575 { 576 - struct steam_device *steam = hid_get_drvdata(hdev); 576 + struct steam_device *steam = hdev->driver_data; 577 577 578 578 return hid_parse_report(hdev, steam->hdev->dev_rdesc, 579 579 steam->hdev->dev_rsize); ··· 590 590 591 591 static int steam_client_ll_open(struct hid_device *hdev) 592 592 { 593 - struct steam_device *steam = hid_get_drvdata(hdev); 593 + struct steam_device *steam = hdev->driver_data; 594 594 int ret; 595 595 596 596 ret = hid_hw_open(steam->hdev); ··· 605 605 606 606 static void steam_client_ll_close(struct hid_device *hdev) 607 607 { 608 - struct steam_device *steam = hid_get_drvdata(hdev); 608 + struct steam_device *steam = hdev->driver_data; 609 609 610 610 mutex_lock(&steam->mutex); 611 611 steam->client_opened = false; ··· 623 623 size_t count, unsigned char report_type, 624 624 int reqtype) 625 625 { 626 - struct steam_device *steam = hid_get_drvdata(hdev); 626 + struct steam_device *steam = hdev->driver_data; 627 627 628 628 return hid_hw_raw_request(steam->hdev, reportnum, buf, count, 629 629 report_type, reqtype); ··· 710 710 ret = PTR_ERR(steam->client_hdev); 711 711 goto client_hdev_fail; 712 712 } 713 - hid_set_drvdata(steam->client_hdev, steam); 713 + steam->client_hdev->driver_data = steam; 714 714 715 715 /* 716 716 * With the real steam controller interface, do not connect hidraw.
+7 -15
drivers/hid/intel-ish-hid/ipc/pci-ish.c
··· 205 205 kfree(ishtp_dev); 206 206 } 207 207 208 - #ifdef CONFIG_PM 209 - static struct device *ish_resume_device; 208 + static struct device __maybe_unused *ish_resume_device; 210 209 211 210 /* 50ms to get resume response */ 212 211 #define WAIT_FOR_RESUME_ACK_MS 50 ··· 219 220 * in that case a simple resume message is enough, others we need 220 221 * a reset sequence. 221 222 */ 222 - static void ish_resume_handler(struct work_struct *work) 223 + static void __maybe_unused ish_resume_handler(struct work_struct *work) 223 224 { 224 225 struct pci_dev *pdev = to_pci_dev(ish_resume_device); 225 226 struct ishtp_device *dev = pci_get_drvdata(pdev); ··· 261 262 * 262 263 * Return: 0 to the pm core 263 264 */ 264 - static int ish_suspend(struct device *device) 265 + static int __maybe_unused ish_suspend(struct device *device) 265 266 { 266 267 struct pci_dev *pdev = to_pci_dev(device); 267 268 struct ishtp_device *dev = pci_get_drvdata(pdev); ··· 287 288 return 0; 288 289 } 289 290 290 - static DECLARE_WORK(resume_work, ish_resume_handler); 291 + static __maybe_unused DECLARE_WORK(resume_work, ish_resume_handler); 291 292 /** 292 293 * ish_resume() - ISH resume callback 293 294 * @device: device pointer ··· 296 297 * 297 298 * Return: 0 to the pm core 298 299 */ 299 - static int ish_resume(struct device *device) 300 + static int __maybe_unused ish_resume(struct device *device) 300 301 { 301 302 struct pci_dev *pdev = to_pci_dev(device); 302 303 struct ishtp_device *dev = pci_get_drvdata(pdev); ··· 310 311 return 0; 311 312 } 312 313 313 - static const struct dev_pm_ops ish_pm_ops = { 314 - .suspend = ish_suspend, 315 - .resume = ish_resume, 316 - }; 317 - #define ISHTP_ISH_PM_OPS (&ish_pm_ops) 318 - #else 319 - #define ISHTP_ISH_PM_OPS NULL 320 - #endif /* CONFIG_PM */ 314 + static SIMPLE_DEV_PM_OPS(ish_pm_ops, ish_suspend, ish_resume); 321 315 322 316 static struct pci_driver ish_driver = { 323 317 .name = KBUILD_MODNAME, 324 318 .id_table = ish_pci_tbl, 325 319 .probe = ish_probe, 326 320 .remove = ish_remove, 327 - .driver.pm = ISHTP_ISH_PM_OPS, 321 + .driver.pm = &ish_pm_ops, 328 322 }; 329 323 330 324 module_pci_driver(ish_driver);
+8
drivers/hid/wacom_sys.c
··· 395 395 } 396 396 } 397 397 398 + /* 2nd-generation Intuos Pro Large has incorrect Y maximum */ 399 + if (hdev->vendor == USB_VENDOR_ID_WACOM && 400 + hdev->product == 0x0358 && 401 + WACOM_PEN_FIELD(field) && 402 + wacom_equivalent_usage(usage->hid) == HID_GD_Y) { 403 + field->logical_maximum = 43200; 404 + } 405 + 398 406 switch (usage->hid) { 399 407 case HID_GD_X: 400 408 features->x_max = field->logical_maximum;