Skip to contentSkip to conversation

platform/x86: intel-vbtn: Remove unused KEYMAP_LEN define

PATCH Applied Hans de Goede 2 participants 3 messages Mar 25, 2021 – Apr 7, 2021 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: intel-vbtn: Remove unused KEYMAP_LEN define

Now that we have 2 separate input_dev-s for the buttons and thw switches, this is no longer used, remove it.

---
 drivers/platform/x86/intel-vbtn.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/platform/x86/intel-vbtn.c +0 -3
index 3fdf4cbec9ad..888a764efad1 100644
@@ -63,9 +63,6 @@ static const struct key_entry intel_vbtn_switchmap[] = {
 	{ KE_END }
 };
 
-#define KEYMAP_LEN \
-	(ARRAY_SIZE(intel_vbtn_keymap) + ARRAY_SIZE(intel_vbtn_switchmap) + 1)
-
 struct intel_vbtn_priv {
 	struct input_dev *buttons_dev;
 	struct input_dev *switches_dev;
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Hans de Goede

Now that we have 2 separate input_dev-s for the buttons and thw switches, this is no longer used, remove it.

Quoted 22 lines
---
 drivers/platform/x86/intel-vbtn.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/platform/x86/intel-vbtn.c +0 -4
index 3fdf4cbec9ad..888a764efad1 100644
@@ -63,9 +63,6 @@ static const struct key_entry intel_vbtn_switchmap[] = {
        { KE_END }
 };
 
-#define KEYMAP_LEN \
-       (ARRAY_SIZE(intel_vbtn_keymap) + ARRAY_SIZE(intel_vbtn_switchmap) + 1)
-
 struct intel_vbtn_priv {
        struct input_dev *buttons_dev;
        struct input_dev *switches_dev;
--

2.30.2

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author Applied
#2 lore raw
In reply to Hans de Goede

Hi,

Quoted 4 lines · Hans de Goede

Now that we have 2 separate input_dev-s for the buttons and thw switches, this is no longer used, remove it.

Applied to my review-hans branch. Andy, thank you for the review.

Regards,

Hans

Quoted 19 lines
---
 drivers/platform/x86/intel-vbtn.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/platform/x86/intel-vbtn.c +0 -3
index 3fdf4cbec9ad..888a764efad1 100644
@@ -63,9 +63,6 @@ static const struct key_entry intel_vbtn_switchmap[] = {
 	{ KE_END }
 };
 
-#define KEYMAP_LEN \
-	(ARRAY_SIZE(intel_vbtn_keymap) + ARRAY_SIZE(intel_vbtn_switchmap) + 1)
-
 struct intel_vbtn_priv {
 	struct input_dev *buttons_dev;
 	struct input_dev *switches_dev;