Skip to content

Commit a02c78f

Browse files
LawstorantJiri Kosina
authored andcommitted
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 <tomasz.pakula.oficjalny@gmail.com> Reviewed-by: Oleg Makarenko <oleg@makarenk.ooo> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent f345a47 commit a02c78f

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

drivers/hid/usbhid/hid-pidff.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -605,16 +605,6 @@ static void pidff_set_device_control(struct pidff_device *pidff, int field)
605605
hid_hw_wait(pidff->hid);
606606
}
607607

608-
/*
609-
* Modify actuators state
610-
*/
611-
static void pidff_set_actuators(struct pidff_device *pidff, bool enable)
612-
{
613-
hid_dbg(pidff->hid, "%s actuators\n", enable ? "Enable" : "Disable");
614-
pidff_set_device_control(pidff,
615-
enable ? PID_ENABLE_ACTUATORS : PID_DISABLE_ACTUATORS);
616-
}
617-
618608
/*
619609
* Reset the device, stop all effects, enable actuators
620610
*/
@@ -626,7 +616,7 @@ static void pidff_reset(struct pidff_device *pidff)
626616
pidff->effect_count = 0;
627617

628618
pidff_set_device_control(pidff, PID_STOP_ALL_EFFECTS);
629-
pidff_set_actuators(pidff, 1);
619+
pidff_set_device_control(pidff, PID_ENABLE_ACTUATORS);
630620
}
631621

632622
/*

0 commit comments

Comments
 (0)