Commit a02c78f7 authored by Tomasz Pakuła's avatar Tomasz Pakuła Committed by Jiri Kosina
Browse files

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: default avatarTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Reviewed-by: default avatarOleg Makarenko <oleg@makarenk.ooo>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent f345a479
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -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);
}

/*