From: Tomasz Pakuła Date: Wed, 13 Aug 2025 20:09:50 +0000 (+0200) Subject: HID: pidff: Remove unhelpful pidff_set_actuators helper X-Git-Tag: v6.18-rc1~81^2~5^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a02c78f708515b236086bf0a9ad4ac7884e78546;p=thirdparty%2Fkernel%2Flinux.git HID: pidff: Remove unhelpful pidff_set_actuators helper Abstracts away too little of the functionality and replaces a nice, defined value with a magic bool. There's no actual need for it. Signed-off-by: Tomasz Pakuła Reviewed-by: Oleg Makarenko Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index c6b4f61e535d..3cf844f7ad4a 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -605,16 +605,6 @@ static void pidff_set_device_control(struct pidff_device *pidff, int field) hid_hw_wait(pidff->hid); } -/* - * Modify actuators state - */ -static void pidff_set_actuators(struct pidff_device *pidff, bool enable) -{ - hid_dbg(pidff->hid, "%s actuators\n", enable ? "Enable" : "Disable"); - pidff_set_device_control(pidff, - enable ? PID_ENABLE_ACTUATORS : PID_DISABLE_ACTUATORS); -} - /* * Reset the device, stop all effects, enable actuators */ @@ -626,7 +616,7 @@ static void pidff_reset(struct pidff_device *pidff) pidff->effect_count = 0; pidff_set_device_control(pidff, PID_STOP_ALL_EFFECTS); - pidff_set_actuators(pidff, 1); + pidff_set_device_control(pidff, PID_ENABLE_ACTUATORS); } /*