]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event()
authorAleksa Savic <savicaleksa83@gmail.com>
Sat, 4 May 2024 09:25:02 +0000 (11:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:22 +0000 (12:02 +0200)
[ Upstream commit 3a034a7b0715eb51124a5263890b1ed39978ed3a ]

In ccp_raw_event(), the ccp->wait_input_report completion is
completed once. Since we're waiting for exactly one report in
send_usb_cmd(), use complete_all() instead of complete()
to mark the completion as spent.

Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver")
Signed-off-by: Aleksa Savic <savicaleksa83@gmail.com>
Acked-by: Marius Zachmann <mail@mariuszachmann.de>
Link: https://lore.kernel.org/r/20240504092504.24158-3-savicaleksa83@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/corsair-cpro.c

index 34136d1b0476451aa25e5ca95172c04e4767d456..e65e3825af97402fed50e1fbe5155ae81f2f17d5 100644 (file)
@@ -140,7 +140,7 @@ static int ccp_raw_event(struct hid_device *hdev, struct hid_report *report, u8
                return 0;
 
        memcpy(ccp->buffer, data, min(IN_BUFFER_SIZE, size));
-       complete(&ccp->wait_input_report);
+       complete_all(&ccp->wait_input_report);
 
        return 0;
 }