Skip to content

Commit bbeface

Browse files
LawstorantJiri Kosina
authored andcommitted
HID: pidff: Rename two functions to align them with naming convention
Driver uses "set" everywhere to indicate setting report values and requesting HID_REQ_SET_REPORT Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent b9c340b commit bbeface

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/hid/usbhid/hid-pidff.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ static void pidff_set_gain_report(struct pidff_device *pidff, u16 gain)
552552
/*
553553
* Clear device control report
554554
*/
555-
static void pidff_send_device_control(struct pidff_device *pidff, int field)
555+
static void pidff_set_device_control(struct pidff_device *pidff, int field)
556556
{
557557
int i, tmp;
558558
int field_index = pidff->control_id[field];
@@ -578,10 +578,10 @@ static void pidff_send_device_control(struct pidff_device *pidff, int field)
578578
/*
579579
* Modify actuators state
580580
*/
581-
static void pidff_modify_actuators_state(struct pidff_device *pidff, bool enable)
581+
static void pidff_set_actuators(struct pidff_device *pidff, bool enable)
582582
{
583583
hid_dbg(pidff->hid, "%s actuators\n", enable ? "Enable" : "Disable");
584-
pidff_send_device_control(pidff,
584+
pidff_set_device_control(pidff,
585585
enable ? PID_ENABLE_ACTUATORS : PID_DISABLE_ACTUATORS);
586586
}
587587

@@ -591,12 +591,12 @@ static void pidff_modify_actuators_state(struct pidff_device *pidff, bool enable
591591
static void pidff_reset(struct pidff_device *pidff)
592592
{
593593
/* We reset twice as sometimes hid_wait_io isn't waiting long enough */
594-
pidff_send_device_control(pidff, PID_RESET);
595-
pidff_send_device_control(pidff, PID_RESET);
594+
pidff_set_device_control(pidff, PID_RESET);
595+
pidff_set_device_control(pidff, PID_RESET);
596596
pidff->effect_count = 0;
597597

598-
pidff_send_device_control(pidff, PID_STOP_ALL_EFFECTS);
599-
pidff_modify_actuators_state(pidff, 1);
598+
pidff_set_device_control(pidff, PID_STOP_ALL_EFFECTS);
599+
pidff_set_actuators(pidff, 1);
600600
}
601601

602602
/*

0 commit comments

Comments
 (0)