diff options
| -rw-r--r-- | drivers/hid/hid-lg.h | 2 | ||||
| -rw-r--r-- | drivers/hid/hid-lg4ff.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hid/hid-lg.h b/drivers/hid/hid-lg.h index 500457b67b21..d64cf8d2751e 100644 --- a/drivers/hid/hid-lg.h +++ b/drivers/hid/hid-lg.h | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #ifndef __HID_LG_H | 1 | #ifndef __HID_LG_H |
| 2 | #define __HID_LG_H | 2 | #define __HID_LG_H |
| 3 | 3 | ||
| 4 | #include <linux/spinlock.h> | ||
| 5 | |||
| 6 | struct lg_drv_data { | 4 | struct lg_drv_data { |
| 7 | unsigned long quirks; | 5 | unsigned long quirks; |
| 8 | void *device_props; /* Device specific properties */ | 6 | void *device_props; /* Device specific properties */ |
diff --git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c index 6ecc9e220440..11452920a6c3 100644 --- a/drivers/hid/hid-lg4ff.c +++ b/drivers/hid/hid-lg4ff.c | |||
| @@ -466,6 +466,9 @@ int lg4ff_deinit(struct hid_device *hid) | |||
| 466 | bool found = 0; | 466 | bool found = 0; |
| 467 | struct lg4ff_device_entry *entry; | 467 | struct lg4ff_device_entry *entry; |
| 468 | struct list_head *h, *g; | 468 | struct list_head *h, *g; |
| 469 | |||
| 470 | device_remove_file(&hid->dev, &dev_attr_range); | ||
| 471 | |||
| 469 | list_for_each_safe(h, g, &device_list.list) { | 472 | list_for_each_safe(h, g, &device_list.list) { |
| 470 | entry = list_entry(h, struct lg4ff_device_entry, list); | 473 | entry = list_entry(h, struct lg4ff_device_entry, list); |
| 471 | if (strcmp(entry->device_id, (&hid->dev)->kobj.name) == 0) { | 474 | if (strcmp(entry->device_id, (&hid->dev)->kobj.name) == 0) { |
| @@ -478,11 +481,10 @@ int lg4ff_deinit(struct hid_device *hid) | |||
| 478 | } | 481 | } |
| 479 | 482 | ||
| 480 | if (!found) { | 483 | if (!found) { |
| 481 | dbg_hid("Device entry not found!\n"); | 484 | hid_err(hid, "Device entry not found!\n"); |
| 482 | return -1; | 485 | return -1; |
| 483 | } | 486 | } |
| 484 | 487 | ||
| 485 | device_remove_file(&hid->dev, &dev_attr_range); | ||
| 486 | dbg_hid("Device successfully unregistered\n"); | 488 | dbg_hid("Device successfully unregistered\n"); |
| 487 | return 0; | 489 | return 0; |
| 488 | } | 490 | } |
