diff options
-rw-r--r-- | drivers/hid/hid-magicmouse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c index 4a3a94f2b10c..c174b64c3810 100644 --- a/drivers/hid/hid-magicmouse.c +++ b/drivers/hid/hid-magicmouse.c | |||
@@ -353,7 +353,7 @@ static int magicmouse_probe(struct hid_device *hdev, | |||
353 | goto err_free; | 353 | goto err_free; |
354 | } | 354 | } |
355 | 355 | ||
356 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); | 356 | ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDINPUT); |
357 | if (ret) { | 357 | if (ret) { |
358 | dev_err(&hdev->dev, "magicmouse hw start failed\n"); | 358 | dev_err(&hdev->dev, "magicmouse hw start failed\n"); |
359 | goto err_free; | 359 | goto err_free; |
@@ -409,8 +409,11 @@ err_free: | |||
409 | 409 | ||
410 | static void magicmouse_remove(struct hid_device *hdev) | 410 | static void magicmouse_remove(struct hid_device *hdev) |
411 | { | 411 | { |
412 | struct magicmouse_sc *msc = hid_get_drvdata(hdev); | ||
413 | |||
412 | hid_hw_stop(hdev); | 414 | hid_hw_stop(hdev); |
413 | kfree(hid_get_drvdata(hdev)); | 415 | input_unregister_device(msc->input); |
416 | kfree(msc); | ||
414 | } | 417 | } |
415 | 418 | ||
416 | static const struct hid_device_id magic_mice[] = { | 419 | static const struct hid_device_id magic_mice[] = { |