From c129585112c74b82f6e77320e0e885275a781195 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Mon, 7 Aug 2017 19:43:18 -0700 Subject: Input: iforce - constify usb_device_id and fix space before '[' error usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/iforce/iforce-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c index db64adfbe1af..e8724f1a4a25 100644 --- a/drivers/input/joystick/iforce/iforce-usb.c +++ b/drivers/input/joystick/iforce/iforce-usb.c @@ -209,7 +209,7 @@ static void iforce_usb_disconnect(struct usb_interface *intf) kfree(iforce); } -static struct usb_device_id iforce_usb_ids [] = { +static const struct usb_device_id iforce_usb_ids[] = { { USB_DEVICE(0x044f, 0xa01c) }, /* Thrustmaster Motor Sport GT */ { USB_DEVICE(0x046d, 0xc281) }, /* Logitech WingMan Force */ { USB_DEVICE(0x046d, 0xc291) }, /* Logitech WingMan Formula Force */ -- cgit v1.2.3-55-g7522 From 94aef061c796d3d47f1a2eed41e651ffaaade402 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Mon, 7 Aug 2017 20:04:13 -0700 Subject: Input: xpad - constify usb_device_id usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 298a6ba51411..2578a7677040 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -408,7 +408,7 @@ static const signed short xpad_abs_triggers[] = { #define XPAD_XBOXONE_VENDOR(vend) \ { XPAD_XBOXONE_VENDOR_PROTOCOL(vend, 208) } -static struct usb_device_id xpad_table[] = { +static const struct usb_device_id xpad_table[] = { { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */ -- cgit v1.2.3-55-g7522 From b9e8cbc437103b30f3289b3fe174c678c725258e Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:07:32 -0700 Subject: Input: iforce - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/iforce/iforce-serio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/iforce/iforce-serio.c b/drivers/input/joystick/iforce/iforce-serio.c index 46d5041d2d9d..154e827b559b 100644 --- a/drivers/input/joystick/iforce/iforce-serio.c +++ b/drivers/input/joystick/iforce/iforce-serio.c @@ -164,7 +164,7 @@ static void iforce_serio_disconnect(struct serio *serio) kfree(iforce); } -static struct serio_device_id iforce_serio_ids[] = { +static const struct serio_device_id iforce_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_IFORCE, -- cgit v1.2.3-55-g7522 From f31103f8ed17297f900d319bfdb7140877d9c057 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:07:48 -0700 Subject: Input: magellan - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/magellan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index c5358ba1f571..a9d0e3edca94 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -198,7 +198,7 @@ static int magellan_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id magellan_serio_ids[] = { +static const struct serio_device_id magellan_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_MAGELLAN, -- cgit v1.2.3-55-g7522 From c62c68f81dc92e5d162230c924ca83b682272697 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:08:02 -0700 Subject: Input: spaceball - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/spaceball.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index f4445a4e8d6a..e9712a1b7cad 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c @@ -272,7 +272,7 @@ static int spaceball_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id spaceball_serio_ids[] = { +static const struct serio_device_id spaceball_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_SPACEBALL, -- cgit v1.2.3-55-g7522 From ecfd71af894ab2f0ce24df59232479d4a088ebce Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:08:17 -0700 Subject: Input: spaceorb - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/spaceorb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index f2667820e8c5..05da0ed514e2 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c @@ -213,7 +213,7 @@ static int spaceorb_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id spaceorb_serio_ids[] = { +static const struct serio_device_id spaceorb_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_SPACEORB, -- cgit v1.2.3-55-g7522 From fa0426c6cfdf89726f4e9495d6870f01374459f9 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:08:29 -0700 Subject: Input: stinger - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/stinger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index 099c6d7b5e08..cb10e7b097ae 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c @@ -184,7 +184,7 @@ static int stinger_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id stinger_serio_ids[] = { +static const struct serio_device_id stinger_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_STINGER, -- cgit v1.2.3-55-g7522 From a1e29643bc10873821a1b9fe4551224370379f78 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:08:41 -0700 Subject: Input: twidjoy - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/twidjoy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index 7f7e5ab3f9e3..e60cb004cb8c 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c @@ -233,7 +233,7 @@ static int twidjoy_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id twidjoy_serio_ids[] = { +static const struct serio_device_id twidjoy_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_TWIDJOY, -- cgit v1.2.3-55-g7522 From bee186de9ad116a5e0fb6c67578e430257afbdcf Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:08:52 -0700 Subject: Input: warrior - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/warrior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index e13a9144a25d..ef5391ba4470 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -193,7 +193,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id warrior_serio_ids[] = { +static const struct serio_device_id warrior_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_WARRIOR, -- cgit v1.2.3-55-g7522 From b06bc6b6bf8cf68daca123ddcc3391ef08411f58 Mon Sep 17 00:00:00 2001 From: Arvind Yadav Date: Fri, 18 Aug 2017 17:09:05 -0700 Subject: Input: zhenhua - constify serio_device_id serio_device_id are not supposed to change at runtime. All functions working with serio_device_id provided by work with const serio_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/zhenhua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/input/joystick') diff --git a/drivers/input/joystick/zhenhua.c b/drivers/input/joystick/zhenhua.c index 4a8258bf13fd..5c6d5de743f1 100644 --- a/drivers/input/joystick/zhenhua.c +++ b/drivers/input/joystick/zhenhua.c @@ -192,7 +192,7 @@ static int zhenhua_connect(struct serio *serio, struct serio_driver *drv) * The serio driver structure. */ -static struct serio_device_id zhenhua_serio_ids[] = { +static const struct serio_device_id zhenhua_serio_ids[] = { { .type = SERIO_RS232, .proto = SERIO_ZHENHUA, -- cgit v1.2.3-55-g7522