HID: sony: initialize sony_dev_list_lock properly
authorJiri Kosina <jkosina@suse.cz>
Mon, 23 Feb 2015 10:15:44 +0000 (11:15 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 23 Feb 2015 10:15:44 +0000 (11:15 +0100)
sony_dev_list_lock spinlock (which was introduced in d2d782fccee ("HID: sony:
Prevent duplicate controller connections") is not being initialized properly.
Fix that.

Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c

index 38d8af5..e87148d 100644 (file)
@@ -804,7 +804,7 @@ union sixaxis_output_report_01 {
 #define DS4_REPORT_0x81_SIZE 7
 #define SIXAXIS_REPORT_0xF2_SIZE 18
 
-static spinlock_t sony_dev_list_lock;
+static DEFINE_SPINLOCK(sony_dev_list_lock);
 static LIST_HEAD(sony_device_list);
 static DEFINE_IDA(sony_device_id_allocator);