From 92aec2026dece012dc88c604fa97d727771a3fc0 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Fri, 19 Jan 2024 15:27:29 +0800 Subject: HID: nintendo: Remove some unused functions These functions are defined in the hid-nintendo.c file, but not called elsewhere, so delete these unused functions. drivers/hid/hid-nintendo.c:670:20: warning: unused function 'joycon_device_is_left_joycon'. drivers/hid/hid-nintendo.c:674:20: warning: unused function 'joycon_device_is_right_joycon' Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7992 Signed-off-by: Jiapeng Chong Reviewed-by: Silvan Jegen Signed-off-by: Jiri Kosina --- drivers/hid/hid-nintendo.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'drivers') diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index ccc4032fb2b0..7ce6be0a8dee 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -667,16 +667,6 @@ 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_left_joycon(struct joycon_ctlr *ctlr) -{ - return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_JOYCONL; -} - -static inline bool joycon_device_is_right_joycon(struct joycon_ctlr *ctlr) -{ - return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_JOYCONR; -} - static inline bool joycon_device_is_procon(struct joycon_ctlr *ctlr) { return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_PROCON; -- cgit v1.2.3 From 05c7d1de81eb615d994e50bd7fb9c948ea1989e2 Mon Sep 17 00:00:00 2001 From: Jiapeng Chong Date: Fri, 26 Jan 2024 15:54:45 +0800 Subject: HID: nintendo: Remove some unused functions These functions are defined in the hid-nintendo.c file, but not called elsewhere, so delete these unused functions. drivers/hid/hid-nintendo.c:757:20: warning: unused function 'joycon_type_has_left_controls'. drivers/hid/hid-nintendo.c:763:20: warning: unused function 'joycon_type_has_right_controls'. Fixes: 94f18bb1994 ("HID: nintendo: add support for nso controllers") Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8060 Signed-off-by: Jiapeng Chong Signed-off-by: Jiri Kosina --- drivers/hid/hid-nintendo.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers') diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index 7ce6be0a8dee..ab5953fc2436 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -754,18 +754,6 @@ static inline bool joycon_type_is_right_nescon(struct joycon_ctlr *ctlr) return ctlr->ctlr_type == JOYCON_CTLR_TYPE_NESR; } -static inline bool joycon_type_has_left_controls(struct joycon_ctlr *ctlr) -{ - return joycon_type_is_left_joycon(ctlr) || - joycon_type_is_procon(ctlr); -} - -static inline bool joycon_type_has_right_controls(struct joycon_ctlr *ctlr) -{ - return joycon_type_is_right_joycon(ctlr) || - joycon_type_is_procon(ctlr); -} - static inline bool joycon_type_is_any_joycon(struct joycon_ctlr *ctlr) { return joycon_type_is_left_joycon(ctlr) || -- cgit v1.2.3