diff mbox series

[RFC,4/6] ARM: Stop using deprecated BTN_EXTRA, _SIDE, _FORWARD and _BACK defines

Message ID 20190330133735.14681-5-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series Input: Rename extra mouse buttons defines to match their actual usage | expand

Commit Message

Hans de Goede March 30, 2019, 1:37 p.m. UTC
Because the name of the BTN_EXTRA, _SIDE, _FORWARD and _BACK defines
was a mismatch with how their values were actually being used, they
have been deprecated.

This commit moves all users of these defines under arch/arm over to
the new defines with the _same_ value.

This commit does not cause any functional changes, after this userspace
will see the exact same input_event codes as before.

Note that in case of the "user" buttons in the dts files, the original
usage of BTN_EXTRA is incorrect, as stated in
Documentation/input/event-codes.rst:

"BTN_{0,1,2,etc} are good generic codes for unlabeled buttons. Do not use
meaningful buttons, like BTN_FORWARD.", fixing this falls outside of the
scope of this commit as that would actually cause a functional change.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 arch/arm/boot/dts/imx27-apf27dev.dts             | 2 +-
 arch/arm/boot/dts/omap3-devkit8000-common.dtsi   | 2 +-
 arch/arm/boot/dts/omap4-var-om44customboard.dtsi | 2 +-
 arch/arm/mach-imx/mach-pcm037_eet.c              | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/imx27-apf27dev.dts b/arch/arm/boot/dts/imx27-apf27dev.dts
index 5f84b598e0d0..246ae4f99a83 100644
--- a/arch/arm/boot/dts/imx27-apf27dev.dts
+++ b/arch/arm/boot/dts/imx27-apf27dev.dts
@@ -44,7 +44,7 @@ 
 		user-key {
 			label = "user";
 			gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
-			linux,code = <276>; /* BTN_EXTRA */
+			linux,code = <276>; /* BTN_FORWRD */
 		};
 	};
 
diff --git a/arch/arm/boot/dts/omap3-devkit8000-common.dtsi b/arch/arm/boot/dts/omap3-devkit8000-common.dtsi
index 746a658e84b6..e0620d12ccfc 100644
--- a/arch/arm/boot/dts/omap3-devkit8000-common.dtsi
+++ b/arch/arm/boot/dts/omap3-devkit8000-common.dtsi
@@ -63,7 +63,7 @@ 
 		user {
 			label = "user";
 			gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
-			linux,code = <BTN_EXTRA>;
+			linux,code = <BTN_FORWRD>;
 			wakeup-source;
 		};
 	};
diff --git a/arch/arm/boot/dts/omap4-var-om44customboard.dtsi b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
index 676d8dd0624a..88597c4dd19e 100644
--- a/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
+++ b/arch/arm/boot/dts/omap4-var-om44customboard.dtsi
@@ -40,7 +40,7 @@ 
 		user-key@184 {
 			label = "user";
 			gpios = <&gpio6 24 GPIO_ACTIVE_HIGH>; /* gpio 184 */
-			linux,code = <BTN_EXTRA>;
+			linux,code = <BTN_FORWRD>;
 			wakeup-source;
 		};
 	};
diff --git a/arch/arm/mach-imx/mach-pcm037_eet.c b/arch/arm/mach-imx/mach-pcm037_eet.c
index 15bc956d466b..59b815449f94 100644
--- a/arch/arm/mach-imx/mach-pcm037_eet.c
+++ b/arch/arm/mach-imx/mach-pcm037_eet.c
@@ -124,13 +124,13 @@  static struct gpio_keys_button pcm037_gpio_keys[] = {
 		.wakeup	= 0,
 	}, {
 		.type	= EV_KEY,
-		.code	= BTN_FORWARD,
+		.code	= BTN_EXTRA1,
 		.gpio	= 50,
 		.desc	= "Focus Forward",
 		.wakeup	= 0,
 	}, {
 		.type	= EV_KEY,
-		.code	= BTN_BACK,
+		.code	= BTN_EXTRA2,
 		.gpio	= 51,
 		.desc	= "Focus Backward",
 		.wakeup	= 0,
@@ -142,7 +142,7 @@  static struct gpio_keys_button pcm037_gpio_keys[] = {
 		.wakeup	= 0,
 	}, {
 		.type	= EV_KEY,
-		.code	= BTN_EXTRA,
+		.code	= BTN_FORWRD,
 		.gpio	= 53,
 		.desc	= "Release Full",
 		.wakeup	= 0,