From: Jiri Kosina Date: Mon, 23 Feb 2015 10:15:44 +0000 (+0100) Subject: HID: sony: initialize sony_dev_list_lock properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8b402c929d21a18e9a228d4ad6f0a076577cd63c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git HID: sony: initialize sony_dev_list_lock properly 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 38d8af558d72..e87148dbeb1b 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -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);