constify input usb_device_id.
Subsystems (2)
cover constify input usb_device_id.
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const.
Fix checkpatch.pl error in patch 1,3 and 7:
ERROR: space prohibited before open square bracket '['.
Arvind Yadav (8):
[PATCH 1/8] Input: iforce: constify usb_device_id and fix space before '[' error. [PATCH 2/8] Input: xpad: constify usb_device_id.
[PATCH 3/8] Input: keyspan_remote: constify usb_device_id.
[PATCH 4/8] Input: powermate: constify usb_device_id and fix space before '[' error. [PATCH 5/8] Input: appletouch: constify usb_device_id.
[PATCH 6/8] Input: synaptics_usb: constify usb_device_id.
[PATCH 7/8] Input: acecad: constify usb_device_id and fix space before '[' error. [PATCH 8/8] Input: kbtab: constify usb_device_id.
drivers/input/joystick/iforce/iforce-usb.c | 2 +- drivers/input/joystick/xpad.c | 2 +- drivers/input/misc/keyspan_remote.c | 2 +- drivers/input/misc/powermate.c | 2 +- drivers/input/mouse/appletouch.c | 2 +- drivers/input/mouse/synaptics_usb.c | 2 +- drivers/input/tablet/acecad.c | 2 +- drivers/input/tablet/kbtab.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/8 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 <linux/usb.h> 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 '['.
--- drivers/input/joystick/iforce/iforce-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/iforce/iforce-usb.c +1 -1
@@ -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 */
Signature · 1 line
2.7.4
PATCH 2/8 Input: xpad: constify usb_device_id.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const.
--- drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/joystick/xpad.c +1 -1
@@ -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 */
Signature · 1 line
2.7.4
PATCH 3/8 Input: keyspan_remote: constify usb_device_id.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const.
--- drivers/input/misc/keyspan_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/keyspan_remote.c +1 -1
@@ -85,7 +85,7 @@ static const unsigned short keyspan_key_table[] = { };/* table of devices that work with this driver */ -static struct usb_device_id keyspan_table[] = { +static const struct usb_device_id keyspan_table[] = { {USB_DEVICE (USB_KEYSPAN_VENDOR_ID ,USB_KEYSPAN_PRODUCT_UIA11 ) }, { }/* Terminating entry */ };
Signature · 1 line
2.7.4
PATCH 4/8 Input: powermate: constify usb_device_id and fix space before '[' error.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> 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 '['.
--- drivers/input/misc/powermate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/misc/powermate.c +1 -1
@@ -432,7 +432,7 @@ static void powermate_disconnect(struct usb_interface *intf) } } -static struct usb_device_id powermate_devices [] = { +static const struct usb_device_id powermate_devices[] = { {USB_DEVICE (POWERMATE_VENDOR ,POWERMATE_PRODUCT_NEW ) }, {USB_DEVICE (POWERMATE_VENDOR ,POWERMATE_PRODUCT_OLD ) }, {USB_DEVICE (CONTOUR_VENDOR ,CONTOUR_JOG ) },
Signature · 1 line
2.7.4
PATCH 5/8 Input: appletouch: constify usb_device_id.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const.
--- drivers/input/mouse/appletouch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/mouse/appletouch.c +1 -1
@@ -125,7 +125,7 @@ static const struct atp_info geyser4_info = {* According to Info.plist Geyser IV is the same as Geyser III.) */ -static struct usb_device_id atp_table[] = { +static const struct usb_device_id atp_table[] = {/* PowerBooks Feb 2005, iBooks G4 */ ATP_DEVICE (0x020e , fountain_info),/* FOUNTAIN ANSI */ ATP_DEVICE (0x020f , fountain_info),/* FOUNTAIN ISO */
Signature · 1 line
2.7.4
PATCH 6/8 Input: synaptics_usb: constify usb_device_id.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const.
--- drivers/input/mouse/synaptics_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/mouse/synaptics_usb.c +1 -1
@@ -525,7 +525,7 @@ static int synusb_reset_resume(struct usb_interface *intf)return synusb_resume (intf); } -static struct usb_device_id synusb_idtable[] = { +static const struct usb_device_id synusb_idtable[] = { {USB_DEVICE_SYNAPTICS (TP ,SYNUSB_TOUCHPAD ) }, {USB_DEVICE_SYNAPTICS (INT_TP ,SYNUSB_TOUCHPAD ) }, { USB_DEVICE_SYNAPTICS(CPAD,
Signature · 1 line
2.7.4
PATCH 7/8 Input: acecad: constify usb_device_idi and fix space before '[' error.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> 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 '['.
--- drivers/input/tablet/acecad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/tablet/acecad.c +1 -1
@@ -260,7 +260,7 @@ static void usb_acecad_disconnect(struct usb_interface *intf)kfree (acecad); } -static struct usb_device_id usb_acecad_id_table [] = { +static const struct usb_device_id usb_acecad_id_table[] = { {USB_DEVICE (USB_VENDOR_ID_ACECAD ,USB_DEVICE_ID_FLAIR ), .driver_info =0 }, {USB_DEVICE (USB_VENDOR_ID_ACECAD ,USB_DEVICE_ID_302 ), .driver_info =1 }, { }
Signature · 1 line
2.7.4
PATCH 8/8 Input: kbtab: constify usb_device_id.
In reply to Arvind Yadavusb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const.
--- drivers/input/tablet/kbtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/tablet/kbtab.c +1 -1
@@ -88,7 +88,7 @@ static void kbtab_irq(struct urb *urb) __func__, retval); } -static struct usb_device_id kbtab_ids[] = { +static const struct usb_device_id kbtab_ids[] = { {USB_DEVICE (USB_VENDOR_ID_KBGEAR ,0x1001 ), .driver_info =0 }, { } };
Signature · 1 line
2.7.4
Dmitry Torokhov
maintainerQuoted 17 lines · Arvind Yadav
usb_device_idare not supposed to change at runtime. All functions working withusb_device_idprovided by <linux/usb.h> work with constusb_device_id. So mark the non-const structs as const.Fix checkpatch.pl error in patch 1,3 and 7:
ERROR: space prohibited before open square bracket '['.Arvind Yadav (8):
[PATCH 1/8] Input: iforce: constifyusb_device_idand fix space before '[' error. [PATCH 2/8] Input: xpad: constifyusb_device_id.
[PATCH 3/8] Input:keyspan_remote: constifyusb_device_id.
[PATCH 4/8] Input: powermate: constifyusb_device_idand fix space before '[' error. [PATCH 5/8] Input: appletouch: constifyusb_device_id.
[PATCH 6/8] Input:synaptics_usb: constifyusb_device_id.
[PATCH 7/8] Input: acecad: constifyusb_device_idand fix space before '[' error. [PATCH 8/8] Input: kbtab: constifyusb_device_id.
Quoted 9 lines
drivers/input/joystick/iforce/iforce-usb.c | 2 +- drivers/input/joystick/xpad.c | 2 +- drivers/input/misc/keyspan_remote.c | 2 +- drivers/input/misc/powermate.c | 2 +- drivers/input/mouse/appletouch.c | 2 +- drivers/input/mouse/synaptics_usb.c | 2 +- drivers/input/tablet/acecad.c | 2 +- drivers/input/tablet/kbtab.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
Applied the lot, thank you.
Signature · 1 line
Dmitry