aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-magicmouse.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-04-22 20:08:44 -0400
committerJiri Kosina <jkosina@suse.cz>2010-04-22 20:08:44 -0400
commit6c9468e9eb1252eaefd94ce7f06e1be9b0b641b1 (patch)
tree797676a336b050bfa1ef879377c07e541b9075d6 /drivers/hid/hid-magicmouse.c
parent4cb3ca7cd7e2cae8d1daf5345ec99a1e8502cf3f (diff)
parentc81eddb0e3728661d1585fbc564449c94165cc36 (diff)
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/hid/hid-magicmouse.c')
-rw-r--r--drivers/hid/hid-magicmouse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 4a3a94f2b10c..0d471fc2ab82 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -14,6 +14,7 @@
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/hid.h> 15#include <linux/hid.h>
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/slab.h>
17#include <linux/usb.h> 18#include <linux/usb.h>
18 19
19#include "hid-ids.h" 20#include "hid-ids.h"
@@ -353,7 +354,7 @@ static int magicmouse_probe(struct hid_device *hdev,
353 goto err_free; 354 goto err_free;
354 } 355 }
355 356
356 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); 357 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDINPUT);
357 if (ret) { 358 if (ret) {
358 dev_err(&hdev->dev, "magicmouse hw start failed\n"); 359 dev_err(&hdev->dev, "magicmouse hw start failed\n");
359 goto err_free; 360 goto err_free;
@@ -409,8 +410,11 @@ err_free:
409 410
410static void magicmouse_remove(struct hid_device *hdev) 411static void magicmouse_remove(struct hid_device *hdev)
411{ 412{
413 struct magicmouse_sc *msc = hid_get_drvdata(hdev);
414
412 hid_hw_stop(hdev); 415 hid_hw_stop(hdev);
413 kfree(hid_get_drvdata(hdev)); 416 input_unregister_device(msc->input);
417 kfree(msc);
414} 418}
415 419
416static const struct hid_device_id magic_mice[] = { 420static const struct hid_device_id magic_mice[] = {