diff mbox

input: xpad: remove unused function

Message ID 1453735884-1958624-1-git-send-email-arnd@arndb.de
State Accepted
Commit a6ed4a18ba6a6f5a01e024b9d221d6439bf6ca4c
Headers show

Commit Message

Arnd Bergmann Jan. 25, 2016, 3:30 p.m. UTC
There are two definitions of xpad_identify_controller(), one is used
when CONFIG_JOYSTICK_XPAD_LEDS is set, but the other one is empty
and never used, and we get a gcc warning about it:

drivers/input/joystick/xpad.c:1210:13: warning: 'xpad_identify_controller' defined but not used [-Wunused-function]

This removes the second definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Fixes: cae705baa40b ("Input: xpad - re-send LED command on present event")
---
 drivers/input/joystick/xpad.c | 1 -
 1 file changed, 1 deletion(-)

-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Torokhov Jan. 27, 2016, 11:43 p.m. UTC | #1
On Mon, Jan 25, 2016 at 04:30:41PM +0100, Arnd Bergmann wrote:
> There are two definitions of xpad_identify_controller(), one is used

> when CONFIG_JOYSTICK_XPAD_LEDS is set, but the other one is empty

> and never used, and we get a gcc warning about it:

> 

> drivers/input/joystick/xpad.c:1210:13: warning: 'xpad_identify_controller' defined but not used [-Wunused-function]

> 

> This removes the second definition.

> 

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> Fixes: cae705baa40b ("Input: xpad - re-send LED command on present event")


Applied, thank you.

> ---

>  drivers/input/joystick/xpad.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c

> index 6727954ab74b..e8a84d12b7ff 100644

> --- a/drivers/input/joystick/xpad.c

> +++ b/drivers/input/joystick/xpad.c

> @@ -1207,7 +1207,6 @@ static void xpad_led_disconnect(struct usb_xpad *xpad)

>  #else

>  static int xpad_led_probe(struct usb_xpad *xpad) { return 0; }

>  static void xpad_led_disconnect(struct usb_xpad *xpad) { }

> -static void xpad_identify_controller(struct usb_xpad *xpad) { }

>  #endif

>  

>  static int xpad_start_input(struct usb_xpad *xpad)

> -- 

> 2.7.0

> 


-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 6727954ab74b..e8a84d12b7ff 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1207,7 +1207,6 @@  static void xpad_led_disconnect(struct usb_xpad *xpad)
 #else
 static int xpad_led_probe(struct usb_xpad *xpad) { return 0; }
 static void xpad_led_disconnect(struct usb_xpad *xpad) { }
-static void xpad_identify_controller(struct usb_xpad *xpad) { }
 #endif
 
 static int xpad_start_input(struct usb_xpad *xpad)