diff options
Diffstat (limited to 'drivers/hid/hid-sony.c')
| -rw-r--r-- | drivers/hid/hid-sony.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 31e9d2561106..1896c019e302 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c | |||
| @@ -804,7 +804,7 @@ union sixaxis_output_report_01 { | |||
| 804 | #define DS4_REPORT_0x81_SIZE 7 | 804 | #define DS4_REPORT_0x81_SIZE 7 |
| 805 | #define SIXAXIS_REPORT_0xF2_SIZE 18 | 805 | #define SIXAXIS_REPORT_0xF2_SIZE 18 |
| 806 | 806 | ||
| 807 | static spinlock_t sony_dev_list_lock; | 807 | static DEFINE_SPINLOCK(sony_dev_list_lock); |
| 808 | static LIST_HEAD(sony_device_list); | 808 | static LIST_HEAD(sony_device_list); |
| 809 | static DEFINE_IDA(sony_device_id_allocator); | 809 | static DEFINE_IDA(sony_device_id_allocator); |
| 810 | 810 | ||
| @@ -1944,6 +1944,8 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id) | |||
| 1944 | return -ENOMEM; | 1944 | return -ENOMEM; |
| 1945 | } | 1945 | } |
| 1946 | 1946 | ||
| 1947 | spin_lock_init(&sc->lock); | ||
| 1948 | |||
| 1947 | sc->quirks = quirks; | 1949 | sc->quirks = quirks; |
| 1948 | hid_set_drvdata(hdev, sc); | 1950 | hid_set_drvdata(hdev, sc); |
| 1949 | sc->hdev = hdev; | 1951 | sc->hdev = hdev; |
| @@ -2147,8 +2149,8 @@ static void __exit sony_exit(void) | |||
| 2147 | { | 2149 | { |
| 2148 | dbg_hid("Sony:%s\n", __func__); | 2150 | dbg_hid("Sony:%s\n", __func__); |
| 2149 | 2151 | ||
| 2150 | ida_destroy(&sony_device_id_allocator); | ||
| 2151 | hid_unregister_driver(&sony_driver); | 2152 | hid_unregister_driver(&sony_driver); |
| 2153 | ida_destroy(&sony_device_id_allocator); | ||
| 2152 | } | 2154 | } |
| 2153 | module_init(sony_init); | 2155 | module_init(sony_init); |
| 2154 | module_exit(sony_exit); | 2156 | module_exit(sony_exit); |
