]> Git Repo - J-linux.git/commitdiff
HID: nintendo: Remove some unused functions
authorJiapeng Chong <[email protected]>
Fri, 31 May 2024 08:55:59 +0000 (16:55 +0800)
committerJiri Kosina <[email protected]>
Tue, 4 Jun 2024 09:04:57 +0000 (11:04 +0200)
These functions are defined in the hid-nintendo.c file, but not
called elsewhere, so delete these unused functions.

drivers/hid/hid-nintendo.c:672:20: warning: unused function 'joycon_device_is_procon'.
drivers/hid/hid-nintendo.c:682:20: warning: unused function 'joycon_device_is_snescon'.
drivers/hid/hid-nintendo.c:687:20: warning: unused function 'joycon_device_is_gencon'.
drivers/hid/hid-nintendo.c:692:20: warning: unused function 'joycon_device_is_n64con'.

Reported-by: Abaci Robot <[email protected]>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9265
Signed-off-by: Jiapeng Chong <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/hid-nintendo.c

index b4a97803eca3e7400f69456c19ea006d337b21aa..be7f7e47d65fb0dcb9a07fe1c5b09ffda30c617c 100644 (file)
@@ -658,7 +658,6 @@ struct joycon_ctlr {
        (ctlr->ctlr_type == JOYCON_CTLR_TYPE_JCR || \
         ctlr->ctlr_type == JOYCON_CTLR_TYPE_PRO)
 
-
 /*
  * Controller device helpers
  *
@@ -669,31 +668,11 @@ struct joycon_ctlr {
  * These helpers are most useful early during the HID probe or in conjunction
  * with the capability helpers below.
  */
-static inline bool joycon_device_is_procon(struct joycon_ctlr *ctlr)
-{
-       return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_PROCON;
-}
-
 static inline bool joycon_device_is_chrggrip(struct joycon_ctlr *ctlr)
 {
        return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_CHRGGRIP;
 }
 
-static inline bool joycon_device_is_snescon(struct joycon_ctlr *ctlr)
-{
-       return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_SNESCON;
-}
-
-static inline bool joycon_device_is_gencon(struct joycon_ctlr *ctlr)
-{
-       return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_GENCON;
-}
-
-static inline bool joycon_device_is_n64con(struct joycon_ctlr *ctlr)
-{
-       return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_N64CON;
-}
-
 /*
  * Controller type helpers
  *
This page took 0.051641 seconds and 4 git commands to generate.