aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/usblp.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2005-11-29 03:43:42 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 16:51:40 -0500
commit4c4c9432a6c916729c7296c47fe93b053a73e20c (patch)
tree7f02f456359259da8bae5e3d32fc4411311ee135 /drivers/usb/class/usblp.c
parent9fe6fcd8ccb2c8c661dfd1e07e3122aef31a67d4 (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/class/usblp.c')
-rw-r--r--drivers/usb/class/usblp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 10406b857ac7..6918037e209c 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -199,7 +199,7 @@ struct quirk_printer_struct {
199#define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */ 199#define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */
200#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */ 200#define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
201 201
202static struct quirk_printer_struct quirk_printers[] = { 202static const struct quirk_printer_struct quirk_printers[] = {
203 { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */ 203 { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
204 { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */ 204 { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */
205 { 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */ 205 { 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */
@@ -301,7 +301,7 @@ static void usblp_bulk_write(struct urb *urb, struct pt_regs *regs)
301 * Get and print printer errors. 301 * Get and print printer errors.
302 */ 302 */
303 303
304static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" }; 304static const char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
305 305
306static int usblp_check_status(struct usblp *usblp, int err) 306static int usblp_check_status(struct usblp *usblp, int err)
307{ 307{