提交 042d05b2 编写于 作者: H Hans de Goede 提交者: Jiri Kosina

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: NHans de Goede <hdegoede@redhat.com>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 7383354a
...@@ -464,7 +464,7 @@ static int lg_g15_get_initial_led_brightness(struct lg_g15_data *g15) ...@@ -464,7 +464,7 @@ static int lg_g15_get_initial_led_brightness(struct lg_g15_data *g15)
/******** Input functions ********/ /******** Input functions ********/
/* On the G15 Mark I Logitech has been quite creative with which bit is what */ /* On the G15 Mark I Logitech has been quite creative with which bit is what */
static int lg_g15_event(struct lg_g15_data *g15, u8 *data, int size) static int lg_g15_event(struct lg_g15_data *g15, u8 *data)
{ {
int i, val; int i, val;
...@@ -510,7 +510,7 @@ static int lg_g15_event(struct lg_g15_data *g15, u8 *data, int size) ...@@ -510,7 +510,7 @@ static int lg_g15_event(struct lg_g15_data *g15, u8 *data, int size)
return 0; return 0;
} }
static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data, int size) static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data)
{ {
int i, val; int i, val;
...@@ -542,7 +542,7 @@ static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data, int size) ...@@ -542,7 +542,7 @@ static int lg_g15_v2_event(struct lg_g15_data *g15, u8 *data, int size)
return 0; return 0;
} }
static int lg_g510_event(struct lg_g15_data *g15, u8 *data, int size) static int lg_g510_event(struct lg_g15_data *g15, u8 *data)
{ {
bool game_mode_enabled; bool game_mode_enabled;
int i, val; int i, val;
...@@ -586,7 +586,7 @@ static int lg_g510_event(struct lg_g15_data *g15, u8 *data, int size) ...@@ -586,7 +586,7 @@ static int lg_g510_event(struct lg_g15_data *g15, u8 *data, int size)
return 0; return 0;
} }
static int lg_g510_leds_event(struct lg_g15_data *g15, u8 *data, int size) static int lg_g510_leds_event(struct lg_g15_data *g15, u8 *data)
{ {
bool backlight_disabled; bool backlight_disabled;
...@@ -613,18 +613,18 @@ static int lg_g15_raw_event(struct hid_device *hdev, struct hid_report *report, ...@@ -613,18 +613,18 @@ static int lg_g15_raw_event(struct hid_device *hdev, struct hid_report *report,
switch (g15->model) { switch (g15->model) {
case LG_G15: case LG_G15:
if (data[0] == 0x02 && size == 9) if (data[0] == 0x02 && size == 9)
return lg_g15_event(g15, data, size); return lg_g15_event(g15, data);
break; break;
case LG_G15_V2: case LG_G15_V2:
if (data[0] == 0x02 && size == 5) if (data[0] == 0x02 && size == 5)
return lg_g15_v2_event(g15, data, size); return lg_g15_v2_event(g15, data);
break; break;
case LG_G510: case LG_G510:
case LG_G510_USB_AUDIO: case LG_G510_USB_AUDIO:
if (data[0] == 0x03 && size == 5) if (data[0] == 0x03 && size == 5)
return lg_g510_event(g15, data, size); return lg_g510_event(g15, data);
if (data[0] == 0x04 && size == 2) if (data[0] == 0x04 && size == 2)
return lg_g510_leds_event(g15, data, size); return lg_g510_leds_event(g15, data);
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册