Skip to content

Commit 042d05b

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
HID: lg-g15: Remove unused size argument from lg_*_event() functions
The report-size is already checked in lg_g15_raw_event() before calling the lg_*_event() functions and these functions don't use the passed in size at all, drop the unused parameter. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 7383354 commit 042d05b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/hid/hid-lg-g15.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static int lg_g15_get_initial_led_brightness(struct lg_g15_data *g15)
464464
/******** Input functions ********/
465465

466466
/* On the G15 Mark I Logitech has been quite creative with which bit is what */
467-
static int lg_g15_event(struct lg_g15_data *g15, u8 *data, int size)
467+
static int lg_g15_event(struct lg_g15_data *g15, u8 *data)
468468
{
469469
int i, val;
470470

@@ -510,7 +510,7 @@ static int lg_g15_event(struct lg_g15_data *g15, u8 *data, int size)
510510
return 0;
511511
}
512512

513-
static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data, int size)
513+
static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data)
514514
{
515515
int i, val;
516516

@@ -542,7 +542,7 @@ static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data, int size)
542542
return 0;
543543
}
544544

545-
static int lg_g510_event(struct lg_g15_data *g15, u8 *data, int size)
545+
static int lg_g510_event(struct lg_g15_data *g15, u8 *data)
546546
{
547547
bool game_mode_enabled;
548548
int i, val;
@@ -586,7 +586,7 @@ static int lg_g510_event(struct lg_g15_data *g15, u8 *data, int size)
586586
return 0;
587587
}
588588

589-
static int lg_g510_leds_event(struct lg_g15_data *g15, u8 *data, int size)
589+
static int lg_g510_leds_event(struct lg_g15_data *g15, u8 *data)
590590
{
591591
bool backlight_disabled;
592592

@@ -613,18 +613,18 @@ static int lg_g15_raw_event(struct hid_device *hdev, struct hid_report *report,
613613
switch (g15->model) {
614614
case LG_G15:
615615
if (data[0] == 0x02 && size == 9)
616-
return lg_g15_event(g15, data, size);
616+
return lg_g15_event(g15, data);
617617
break;
618618
case LG_G15_V2:
619619
if (data[0] == 0x02 && size == 5)
620-
return lg_g15_v2_event(g15, data, size);
620+
return lg_g15_v2_event(g15, data);
621621
break;
622622
case LG_G510:
623623
case LG_G510_USB_AUDIO:
624624
if (data[0] == 0x03 && size == 5)
625-
return lg_g510_event(g15, data, size);
625+
return lg_g510_event(g15, data);
626626
if (data[0] == 0x04 && size == 2)
627-
return lg_g510_leds_event(g15, data, size);
627+
return lg_g510_leds_event(g15, data);
628628
break;
629629
}
630630

0 commit comments

Comments
 (0)