diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-hyperv.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-wacom.c | 7 | ||||
-rw-r--r-- | drivers/hid/hid-wiimote-core.c | 4 | ||||
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c index 0c33ae9cf0f0..406632472c1b 100644 --- a/drivers/hid/hid-hyperv.c +++ b/drivers/hid/hid-hyperv.c | |||
@@ -548,6 +548,7 @@ static int mousevsc_remove(struct hv_device *dev) | |||
548 | struct mousevsc_dev *input_dev = hv_get_drvdata(dev); | 548 | struct mousevsc_dev *input_dev = hv_get_drvdata(dev); |
549 | 549 | ||
550 | vmbus_close(dev->channel); | 550 | vmbus_close(dev->channel); |
551 | hid_hw_stop(input_dev->hid_device); | ||
551 | hid_destroy_device(input_dev->hid_device); | 552 | hid_destroy_device(input_dev->hid_device); |
552 | mousevsc_free_device(input_dev); | 553 | mousevsc_free_device(input_dev); |
553 | 554 | ||
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index b47e58b52d9f..acab74cde727 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
@@ -531,7 +531,6 @@ static int wacom_probe(struct hid_device *hdev, | |||
531 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; | 531 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; |
532 | wdata->battery.use_for_apm = 0; | 532 | wdata->battery.use_for_apm = 0; |
533 | 533 | ||
534 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
535 | 534 | ||
536 | ret = power_supply_register(&hdev->dev, &wdata->battery); | 535 | ret = power_supply_register(&hdev->dev, &wdata->battery); |
537 | if (ret) { | 536 | if (ret) { |
@@ -540,6 +539,8 @@ static int wacom_probe(struct hid_device *hdev, | |||
540 | goto err_battery; | 539 | goto err_battery; |
541 | } | 540 | } |
542 | 541 | ||
542 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
543 | |||
543 | wdata->ac.properties = wacom_ac_props; | 544 | wdata->ac.properties = wacom_ac_props; |
544 | wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props); | 545 | wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props); |
545 | wdata->ac.get_property = wacom_ac_get_property; | 546 | wdata->ac.get_property = wacom_ac_get_property; |
@@ -547,14 +548,14 @@ static int wacom_probe(struct hid_device *hdev, | |||
547 | wdata->ac.type = POWER_SUPPLY_TYPE_MAINS; | 548 | wdata->ac.type = POWER_SUPPLY_TYPE_MAINS; |
548 | wdata->ac.use_for_apm = 0; | 549 | wdata->ac.use_for_apm = 0; |
549 | 550 | ||
550 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
551 | |||
552 | ret = power_supply_register(&hdev->dev, &wdata->ac); | 551 | ret = power_supply_register(&hdev->dev, &wdata->ac); |
553 | if (ret) { | 552 | if (ret) { |
554 | hid_warn(hdev, | 553 | hid_warn(hdev, |
555 | "can't create ac battery attribute, err: %d\n", ret); | 554 | "can't create ac battery attribute, err: %d\n", ret); |
556 | goto err_ac; | 555 | goto err_ac; |
557 | } | 556 | } |
557 | |||
558 | power_supply_powers(&wdata->ac, &hdev->dev); | ||
558 | #endif | 559 | #endif |
559 | return 0; | 560 | return 0; |
560 | 561 | ||
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index fc253b472f9d..cac3589b1ed5 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c | |||
@@ -1226,14 +1226,14 @@ static int wiimote_hid_probe(struct hid_device *hdev, | |||
1226 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; | 1226 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; |
1227 | wdata->battery.use_for_apm = 0; | 1227 | wdata->battery.use_for_apm = 0; |
1228 | 1228 | ||
1229 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
1230 | |||
1231 | ret = power_supply_register(&wdata->hdev->dev, &wdata->battery); | 1229 | ret = power_supply_register(&wdata->hdev->dev, &wdata->battery); |
1232 | if (ret) { | 1230 | if (ret) { |
1233 | hid_err(hdev, "Cannot register battery device\n"); | 1231 | hid_err(hdev, "Cannot register battery device\n"); |
1234 | goto err_battery; | 1232 | goto err_battery; |
1235 | } | 1233 | } |
1236 | 1234 | ||
1235 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
1236 | |||
1237 | ret = wiimote_leds_create(wdata); | 1237 | ret = wiimote_leds_create(wdata); |
1238 | if (ret) | 1238 | if (ret) |
1239 | goto err_free; | 1239 | goto err_free; |
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 7c297d305d5d..b1ec0e2aeb57 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c | |||
@@ -922,11 +922,11 @@ void hiddev_disconnect(struct hid_device *hid) | |||
922 | struct hiddev *hiddev = hid->hiddev; | 922 | struct hiddev *hiddev = hid->hiddev; |
923 | struct usbhid_device *usbhid = hid->driver_data; | 923 | struct usbhid_device *usbhid = hid->driver_data; |
924 | 924 | ||
925 | usb_deregister_dev(usbhid->intf, &hiddev_class); | ||
926 | |||
925 | mutex_lock(&hiddev->existancelock); | 927 | mutex_lock(&hiddev->existancelock); |
926 | hiddev->exist = 0; | 928 | hiddev->exist = 0; |
927 | 929 | ||
928 | usb_deregister_dev(usbhid->intf, &hiddev_class); | ||
929 | |||
930 | if (hiddev->open) { | 930 | if (hiddev->open) { |
931 | mutex_unlock(&hiddev->existancelock); | 931 | mutex_unlock(&hiddev->existancelock); |
932 | usbhid_close(hiddev->hid); | 932 | usbhid_close(hiddev->hid); |