From 4c4c9432a6c916729c7296c47fe93b053a73e20c Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Tue, 29 Nov 2005 09:43:42 +0100 Subject: [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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/input/xpad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/usb/input/xpad.c') diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c index e421328615f..e278489a80c 100644 --- a/drivers/usb/input/xpad.c +++ b/drivers/usb/input/xpad.c @@ -70,7 +70,7 @@ #define XPAD_PKT_LEN 32 -static struct xpad_device { +static const struct xpad_device { u16 idVendor; u16 idProduct; char *name; @@ -81,13 +81,13 @@ static struct xpad_device { { 0x0000, 0x0000, "X-Box pad" } }; -static signed short xpad_btn[] = { +static const signed short xpad_btn[] = { BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z, /* "analog" buttons */ BTN_START, BTN_BACK, BTN_THUMBL, BTN_THUMBR, /* start/back/sticks */ -1 /* terminating entry */ }; -static signed short xpad_abs[] = { +static const signed short xpad_abs[] = { ABS_X, ABS_Y, /* left stick */ ABS_RX, ABS_RY, /* right stick */ ABS_Z, ABS_RZ, /* triggers left/right */ -- cgit v1.2.3-70-g09d2