diff options
author | Arjan van de Ven <arjan@infradead.org> | 2005-11-29 03:43:42 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 16:51:40 -0500 |
commit | 4c4c9432a6c916729c7296c47fe93b053a73e20c (patch) | |
tree | 7f02f456359259da8bae5e3d32fc4411311ee135 /drivers/usb/input/xpad.c | |
parent | 9fe6fcd8ccb2c8c661dfd1e07e3122aef31a67d4 (diff) |
[PATCH] USB: mark various usb tables const
patch below marks various USB tables and variables as const so that they
end up in .rodata section and don't cacheline share with things that get
written to. For the non-array variables it also allows gcc to optimize
more.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/input/xpad.c')
-rw-r--r-- | drivers/usb/input/xpad.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c index e421328615fb..e278489a80c6 100644 --- a/drivers/usb/input/xpad.c +++ b/drivers/usb/input/xpad.c | |||
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | #define XPAD_PKT_LEN 32 | 71 | #define XPAD_PKT_LEN 32 |
72 | 72 | ||
73 | static struct xpad_device { | 73 | static const struct xpad_device { |
74 | u16 idVendor; | 74 | u16 idVendor; |
75 | u16 idProduct; | 75 | u16 idProduct; |
76 | char *name; | 76 | char *name; |
@@ -81,13 +81,13 @@ static struct xpad_device { | |||
81 | { 0x0000, 0x0000, "X-Box pad" } | 81 | { 0x0000, 0x0000, "X-Box pad" } |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static signed short xpad_btn[] = { | 84 | static const signed short xpad_btn[] = { |
85 | BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, /* "analog" buttons */ | 85 | BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, /* "analog" buttons */ |
86 | BTN_START, BTN_BACK, BTN_THUMBL, BTN_THUMBR, /* start/back/sticks */ | 86 | BTN_START, BTN_BACK, BTN_THUMBL, BTN_THUMBR, /* start/back/sticks */ |
87 | -1 /* terminating entry */ | 87 | -1 /* terminating entry */ |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static signed short xpad_abs[] = { | 90 | static const signed short xpad_abs[] = { |
91 | ABS_X, ABS_Y, /* left stick */ | 91 | ABS_X, ABS_Y, /* left stick */ |
92 | ABS_RX, ABS_RY, /* right stick */ | 92 | ABS_RX, ABS_RY, /* right stick */ |
93 | ABS_Z, ABS_RZ, /* triggers left/right */ | 93 | ABS_Z, ABS_RZ, /* triggers left/right */ |