aboutsummaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-11-30 16:05:20 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-30 16:05:20 -0800
commit2317108b116924e36615f4f0aaecb60cfe4746aa (patch)
treeb65fbe17a7b2e6f9896de274e6a1ccfa4809f9e2 /usb
parentdd7d7486f0e417615c5ab6eee31c0b783bce0ffe (diff)
downloadpatches-2317108b116924e36615f4f0aaecb60cfe4746aa.tar.gz
usb patches
Diffstat (limited to 'usb')
-rw-r--r--usb/correct-ohci-pxa27x-suspend-resume-struct-confusion.patch64
-rw-r--r--usb/usb-mark-various-usb-tables-const.patch431
2 files changed, 495 insertions, 0 deletions
diff --git a/usb/correct-ohci-pxa27x-suspend-resume-struct-confusion.patch b/usb/correct-ohci-pxa27x-suspend-resume-struct-confusion.patch
new file mode 100644
index 00000000000000..4881ad198f2433
--- /dev/null
+++ b/usb/correct-ohci-pxa27x-suspend-resume-struct-confusion.patch
@@ -0,0 +1,64 @@
+From rpurdie@rpsys.net Mon Nov 28 14:21:56 2005
+Subject: [patch] Correct ohci-pxa27x suspend/resume struct confusion
+From: Richard Purdie <rpurdie@rpsys.net>
+To: Greg KH <gregkh@suse.de>
+Date: Mon, 28 Nov 2005 22:15:46 +0000
+Message-Id: <1133216147.8673.31.camel@localhost.localdomain>
+
+The device data in ohci-pxa27x is a struct hcd, not a struct ohci_hcd.
+This correct the suspend/resume calls to account for this and adds some
+code to invalidate the platform data when the module is removed.
+
+Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/ohci-pxa27x.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/host/ohci-pxa27x.c
++++ gregkh-2.6/drivers/usb/host/ohci-pxa27x.c
+@@ -309,20 +309,22 @@ static int ohci_hcd_pxa27x_drv_remove(st
+ struct usb_hcd *hcd = platform_get_drvdata(pdev);
+
+ usb_hcd_pxa27x_remove(hcd, pdev);
++ platform_set_drvdata(pdev, NULL);
+ return 0;
+ }
+
+ #ifdef CONFIG_PM
+ static int ohci_hcd_pxa27x_drv_suspend(struct platform_device *pdev, pm_message_t state)
+ {
+- struct ohci_hcd *ohci = platform_get_drvdata(pdev);
++ struct usb_hcd *hcd = platform_get_drvdata(pdev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
+ ohci->next_statechange = jiffies;
+
+ pxa27x_stop_hc(&pdev->dev);
+- ohci_to_hcd(ohci)->state = HC_STATE_SUSPENDED;
++ hcd->state = HC_STATE_SUSPENDED;
+ pdev->dev.power.power_state = PMSG_SUSPEND;
+
+ return 0;
+@@ -330,7 +332,8 @@ static int ohci_hcd_pxa27x_drv_suspend(s
+
+ static int ohci_hcd_pxa27x_drv_resume(struct platform_device *pdev)
+ {
+- struct ohci_hcd *ohci = platform_get_drvdata(pdev);
++ struct usb_hcd *hcd = platform_get_drvdata(pdev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+ int status;
+
+ if (time_before(jiffies, ohci->next_statechange))
+@@ -341,7 +344,7 @@ static int ohci_hcd_pxa27x_drv_resume(st
+ return status;
+
+ pdev->dev.power.power_state = PMSG_ON;
+- usb_hcd_resume_root_hub(platform_get_drvdata(pdev));
++ usb_hcd_resume_root_hub(hcd);
+
+ return 0;
+ }
diff --git a/usb/usb-mark-various-usb-tables-const.patch b/usb/usb-mark-various-usb-tables-const.patch
new file mode 100644
index 00000000000000..5ba1598bf5e6e7
--- /dev/null
+++ b/usb/usb-mark-various-usb-tables-const.patch
@@ -0,0 +1,431 @@
+From SRS0+5744165ee46508c39e92+828+infradead.org+arjan@pentafluge.srs.infradead.org Tue Nov 29 00:45:22 2005
+Subject: USB: mark various usb tables const
+From: Arjan van de Ven <arjan@infradead.org>
+To: Greg KH <greg@kroah.com>
+Date: Tue, 29 Nov 2005 09:43:42 +0100
+Message-Id: <1133253823.2804.27.camel@laptopd505.fenrus.org>
+
+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>
+
+
+---
+ drivers/usb/class/cdc-acm.c | 4 ++--
+ drivers/usb/class/usblp.c | 4 ++--
+ drivers/usb/core/devices.c | 20 ++++++++++----------
+ drivers/usb/host/uhci-debug.c | 2 +-
+ drivers/usb/input/aiptek.c | 2 +-
+ drivers/usb/input/ati_remote.c | 4 ++--
+ drivers/usb/input/fixp-arith.h | 2 +-
+ drivers/usb/input/hid-core.c | 2 +-
+ drivers/usb/input/hid-input.c | 4 ++--
+ drivers/usb/input/keyspan_remote.c | 2 +-
+ drivers/usb/input/xpad.c | 6 +++---
+ drivers/usb/media/konicawc.c | 6 +++---
+ drivers/usb/media/ov511.c | 2 +-
+ drivers/usb/media/pwc/pwc-ctrl.c | 2 +-
+ drivers/usb/media/stv680.h | 6 +++---
+ drivers/usb/media/usbvideo.c | 2 +-
+ drivers/usb/misc/sisusbvga/sisusb.c | 4 ++--
+ drivers/usb/serial/ftdi_sio.c | 2 +-
+ drivers/usb/serial/io_edgeport.c | 2 +-
+ drivers/usb/serial/io_fw_boot2.h | 2 +-
+ drivers/usb/serial/safe_serial.c | 2 +-
+ drivers/usb/storage/sddr09.c | 2 +-
+ drivers/usb/storage/usb.c | 2 +-
+ 23 files changed, 43 insertions(+), 43 deletions(-)
+
+--- gregkh-2.6.orig/drivers/usb/class/cdc-acm.c
++++ gregkh-2.6/drivers/usb/class/cdc-acm.c
+@@ -658,7 +658,7 @@ static int acm_tty_ioctl(struct tty_stru
+ return -ENOIOCTLCMD;
+ }
+
+-static __u32 acm_tty_speed[] = {
++static const __u32 acm_tty_speed[] = {
+ 0, 50, 75, 110, 134, 150, 200, 300, 600,
+ 1200, 1800, 2400, 4800, 9600, 19200, 38400,
+ 57600, 115200, 230400, 460800, 500000, 576000,
+@@ -666,7 +666,7 @@ static __u32 acm_tty_speed[] = {
+ 2500000, 3000000, 3500000, 4000000
+ };
+
+-static __u8 acm_tty_size[] = {
++static const __u8 acm_tty_size[] = {
+ 5, 6, 7, 8
+ };
+
+--- gregkh-2.6.orig/drivers/usb/class/usblp.c
++++ gregkh-2.6/drivers/usb/class/usblp.c
+@@ -199,7 +199,7 @@ struct quirk_printer_struct {
+ #define USBLP_QUIRK_BIDIR 0x1 /* reports bidir but requires unidirectional mode (no INs/reads) */
+ #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
+
+-static struct quirk_printer_struct quirk_printers[] = {
++static const struct quirk_printer_struct quirk_printers[] = {
+ { 0x03f0, 0x0004, USBLP_QUIRK_BIDIR }, /* HP DeskJet 895C */
+ { 0x03f0, 0x0104, USBLP_QUIRK_BIDIR }, /* HP DeskJet 880C */
+ { 0x03f0, 0x0204, USBLP_QUIRK_BIDIR }, /* HP DeskJet 815C */
+@@ -301,7 +301,7 @@ static void usblp_bulk_write(struct urb
+ * Get and print printer errors.
+ */
+
+-static char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
++static const char *usblp_messages[] = { "ok", "out of paper", "off-line", "on fire" };
+
+ static int usblp_check_status(struct usblp *usblp, int err)
+ {
+--- gregkh-2.6.orig/drivers/usb/core/devices.c
++++ gregkh-2.6/drivers/usb/core/devices.c
+@@ -67,45 +67,45 @@
+ /* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
+ #define ALLOW_SERIAL_NUMBER
+
+-static char *format_topo =
++static const char *format_topo =
+ /* T: Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd */
+ "\nT: Bus=%2.2d Lev=%2.2d Prnt=%2.2d Port=%2.2d Cnt=%2.2d Dev#=%3d Spd=%3s MxCh=%2d\n";
+
+-static char *format_string_manufacturer =
++static const char *format_string_manufacturer =
+ /* S: Manufacturer=xxxx */
+ "S: Manufacturer=%.100s\n";
+
+-static char *format_string_product =
++static const char *format_string_product =
+ /* S: Product=xxxx */
+ "S: Product=%.100s\n";
+
+ #ifdef ALLOW_SERIAL_NUMBER
+-static char *format_string_serialnumber =
++static const char *format_string_serialnumber =
+ /* S: SerialNumber=xxxx */
+ "S: SerialNumber=%.100s\n";
+ #endif
+
+-static char *format_bandwidth =
++static const char *format_bandwidth =
+ /* B: Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd */
+ "B: Alloc=%3d/%3d us (%2d%%), #Int=%3d, #Iso=%3d\n";
+
+-static char *format_device1 =
++static const char *format_device1 =
+ /* D: Ver=xx.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd */
+ "D: Ver=%2x.%02x Cls=%02x(%-5s) Sub=%02x Prot=%02x MxPS=%2d #Cfgs=%3d\n";
+
+-static char *format_device2 =
++static const char *format_device2 =
+ /* P: Vendor=xxxx ProdID=xxxx Rev=xx.xx */
+ "P: Vendor=%04x ProdID=%04x Rev=%2x.%02x\n";
+
+-static char *format_config =
++static const char *format_config =
+ /* C: #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA */
+ "C:%c #Ifs=%2d Cfg#=%2d Atr=%02x MxPwr=%3dmA\n";
+
+-static char *format_iface =
++static const char *format_iface =
+ /* I: If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=xxxx*/
+ "I: If#=%2d Alt=%2d #EPs=%2d Cls=%02x(%-5s) Sub=%02x Prot=%02x Driver=%s\n";
+
+-static char *format_endpt =
++static const char *format_endpt =
+ /* E: Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=D?s */
+ "E: Ad=%02x(%c) Atr=%02x(%-4s) MxPS=%4d Ivl=%d%cs\n";
+
+--- gregkh-2.6.orig/drivers/usb/host/uhci-debug.c
++++ gregkh-2.6/drivers/usb/host/uhci-debug.c
+@@ -197,7 +197,7 @@ out:
+ }
+
+ #ifdef CONFIG_PROC_FS
+-static const char *qh_names[] = {
++static const char * const qh_names[] = {
+ "skel_int128_qh", "skel_int64_qh",
+ "skel_int32_qh", "skel_int16_qh",
+ "skel_int8_qh", "skel_int4_qh",
+--- gregkh-2.6.orig/drivers/usb/input/aiptek.c
++++ gregkh-2.6/drivers/usb/input/aiptek.c
+@@ -338,7 +338,7 @@ struct aiptek {
+ * the bitmap which comes from the tablet. This hides the
+ * issue that the F_keys are not sequentially numbered.
+ */
+-static int macroKeyEvents[] = {
++static const int macroKeyEvents[] = {
+ KEY_ESC, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5,
+ KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11,
+ KEY_F12, KEY_F13, KEY_F14, KEY_F15, KEY_F16, KEY_F17,
+--- gregkh-2.6.orig/drivers/usb/input/ati_remote.c
++++ gregkh-2.6/drivers/usb/input/ati_remote.c
+@@ -146,7 +146,7 @@ static char init1[] = { 0x01, 0x00, 0x20
+ static char init2[] = { 0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
+
+ /* Acceleration curve for directional control pad */
+-static char accel[] = { 1, 2, 4, 6, 9, 13, 20 };
++static const char accel[] = { 1, 2, 4, 6, 9, 13, 20 };
+
+ /* Duplicate event filtering time.
+ * Sequential, identical KIND_FILTERED inputs with less than
+@@ -197,7 +197,7 @@ struct ati_remote {
+ #define KIND_ACCEL 7 /* Directional keypad - left, right, up, down.*/
+
+ /* Translation table from hardware messages to input events. */
+-static struct {
++static const struct {
+ short kind;
+ unsigned char data1, data2;
+ int type;
+--- gregkh-2.6.orig/drivers/usb/input/fixp-arith.h
++++ gregkh-2.6/drivers/usb/input/fixp-arith.h
+@@ -38,7 +38,7 @@ typedef s16 fixp_t;
+ #define FRAC_MASK ((1<<FRAC_N)-1)
+
+ // Not to be used directly. Use fixp_{cos,sin}
+-static fixp_t cos_table[45] = {
++static const fixp_t cos_table[45] = {
+ 0x0100, 0x00FF, 0x00FF, 0x00FE, 0x00FD, 0x00FC, 0x00FA, 0x00F8,
+ 0x00F6, 0x00F3, 0x00F0, 0x00ED, 0x00E9, 0x00E6, 0x00E2, 0x00DD,
+ 0x00D9, 0x00D4, 0x00CF, 0x00C9, 0x00C4, 0x00BE, 0x00B8, 0x00B1,
+--- gregkh-2.6.orig/drivers/usb/input/hid-core.c
++++ gregkh-2.6/drivers/usb/input/hid-core.c
+@@ -1452,7 +1452,7 @@ void hid_init_reports(struct hid_device
+ * Alphabetically sorted blacklist by quirk type.
+ */
+
+-static struct hid_blacklist {
++static const struct hid_blacklist {
+ __u16 idVendor;
+ __u16 idProduct;
+ unsigned quirks;
+--- gregkh-2.6.orig/drivers/usb/input/hid-input.c
++++ gregkh-2.6/drivers/usb/input/hid-input.c
+@@ -39,7 +39,7 @@
+
+ #define unk KEY_UNKNOWN
+
+-static unsigned char hid_keyboard[256] = {
++static const unsigned char hid_keyboard[256] = {
+ 0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
+ 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
+@@ -58,7 +58,7 @@ static unsigned char hid_keyboard[256] =
+ 150,158,159,128,136,177,178,176,142,152,173,140,unk,unk,unk,unk
+ };
+
+-static struct {
++static const struct {
+ __s32 x;
+ __s32 y;
+ } hid_hat_to_axis[] = {{ 0, 0}, { 0,-1}, { 1,-1}, { 1, 0}, { 1, 1}, { 0, 1}, {-1, 1}, {-1, 0}, {-1,-1}};
+--- gregkh-2.6.orig/drivers/usb/input/keyspan_remote.c
++++ gregkh-2.6/drivers/usb/input/keyspan_remote.c
+@@ -95,7 +95,7 @@ struct usb_keyspan {
+ * Currently there are 15 and 17 button models so RESERVED codes
+ * are blank areas in the mapping.
+ */
+-static int keyspan_key_table[] = {
++static const int keyspan_key_table[] = {
+ KEY_RESERVED, /* 0 is just a place holder. */
+ KEY_RESERVED,
+ KEY_STOP,
+--- gregkh-2.6.orig/drivers/usb/input/xpad.c
++++ gregkh-2.6/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 */
+--- gregkh-2.6.orig/drivers/usb/media/konicawc.c
++++ gregkh-2.6/drivers/usb/media/konicawc.c
+@@ -77,14 +77,14 @@ static int saturation = MAX_SATURATION/2
+ static int sharpness = MAX_SHARPNESS/2;
+ static int whitebal = 3*(MAX_WHITEBAL/4);
+
+-static int spd_to_iface[] = { 1, 0, 3, 2, 4, 5, 6 };
++static const int spd_to_iface[] = { 1, 0, 3, 2, 4, 5, 6 };
+
+ /* These FPS speeds are from the windows config box. They are
+ * indexed on size (0-2) and speed (0-6). Divide by 3 to get the
+ * real fps.
+ */
+
+-static int spd_to_fps[][7] = { { 24, 40, 48, 60, 72, 80, 100 },
++static const int spd_to_fps[][7] = { { 24, 40, 48, 60, 72, 80, 100 },
+ { 24, 40, 48, 60, 72, 80, 100 },
+ { 18, 30, 36, 45, 54, 60, 75 },
+ { 6, 10, 12, 15, 18, 21, 25 } };
+@@ -95,7 +95,7 @@ struct cam_size {
+ u8 cmd;
+ };
+
+-static struct cam_size camera_sizes[] = { { 160, 120, 0x7 },
++static const struct cam_size camera_sizes[] = { { 160, 120, 0x7 },
+ { 160, 136, 0xa },
+ { 176, 144, 0x4 },
+ { 320, 240, 0x5 } };
+--- gregkh-2.6.orig/drivers/usb/media/ov511.c
++++ gregkh-2.6/drivers/usb/media/ov511.c
+@@ -211,7 +211,7 @@ static struct ov51x_decomp_ops *ov518_mm
+
+ /* Number of times to retry a failed I2C transaction. Increase this if you
+ * are getting "Failed to read sensor ID..." */
+-static int i2c_detect_tries = 5;
++static const int i2c_detect_tries = 5;
+
+ /* MMX support is present in kernel and CPU. Checked upon decomp module load. */
+ #if defined(__i386__) || defined(__x86_64__)
+--- gregkh-2.6.orig/drivers/usb/media/pwc/pwc-ctrl.c
++++ gregkh-2.6/drivers/usb/media/pwc/pwc-ctrl.c
+@@ -109,7 +109,7 @@
+ #define PT_RESET_CONTROL_FORMATTER 0x02
+ #define PT_STATUS_FORMATTER 0x03
+
+-static char *size2name[PSZ_MAX] =
++static const char *size2name[PSZ_MAX] =
+ {
+ "subQCIF",
+ "QSIF",
+--- gregkh-2.6.orig/drivers/usb/media/stv680.h
++++ gregkh-2.6/drivers/usb/media/stv680.h
+@@ -151,7 +151,7 @@ struct usb_stv {
+ };
+
+
+-static unsigned char red[256] = {
++static const unsigned char red[256] = {
+ 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 25, 30, 35, 38, 42,
+ 44, 47, 50, 53, 54, 57, 59, 61, 63, 65, 67, 69,
+@@ -176,7 +176,7 @@ static unsigned char red[256] = {
+ 220, 220, 221, 221
+ };
+
+-static unsigned char green[256] = {
++static const unsigned char green[256] = {
+ 0, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
+ 21, 21, 21, 21, 21, 21, 21, 28, 34, 39, 43, 47,
+ 50, 53, 56, 59, 61, 64, 66, 68, 71, 73, 75, 77,
+@@ -201,7 +201,7 @@ static unsigned char green[256] = {
+ 245, 245, 246, 246
+ };
+
+-static unsigned char blue[256] = {
++static const unsigned char blue[256] = {
+ 0, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 30, 37, 42, 47, 51,
+ 55, 58, 61, 64, 67, 70, 72, 74, 78, 80, 82, 84,
+--- gregkh-2.6.orig/drivers/usb/media/usbvideo.c
++++ gregkh-2.6/drivers/usb/media/usbvideo.c
+@@ -955,7 +955,7 @@ static struct file_operations usbvideo_f
+ .ioctl = usbvideo_v4l_ioctl,
+ .llseek = no_llseek,
+ };
+-static struct video_device usbvideo_template = {
++static const struct video_device usbvideo_template = {
+ .owner = THIS_MODULE,
+ .type = VID_TYPE_CAPTURE,
+ .hardware = VID_HARDWARE_CPIA,
+--- gregkh-2.6.orig/drivers/usb/misc/sisusbvga/sisusb.c
++++ gregkh-2.6/drivers/usb/misc/sisusbvga/sisusb.c
+@@ -2437,8 +2437,8 @@ sisusb_reset_text_mode(struct sisusb_usb
+ u8 *tempbuf;
+ u16 *tempbufb;
+ size_t written;
+- static char bootstring[] = "SiSUSB VGA text console, (C) 2005 Thomas Winischhofer.";
+- static char bootlogo[] = "(o_ //\\ V_/_";
++ static const char bootstring[] = "SiSUSB VGA text console, (C) 2005 Thomas Winischhofer.";
++ static const char bootlogo[] = "(o_ //\\ V_/_";
+
+ /* sisusb->lock is down */
+
+--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.c
++++ gregkh-2.6/drivers/usb/serial/ftdi_sio.c
+@@ -491,7 +491,7 @@ static struct usb_driver ftdi_driver = {
+ .no_dynamic_id = 1,
+ };
+
+-static char *ftdi_chip_name[] = {
++static const char *ftdi_chip_name[] = {
+ [SIO] = "SIO", /* the serial part of FT8U100AX */
+ [FT8U232AM] = "FT8U232AM",
+ [FT232BM] = "FT232BM",
+--- gregkh-2.6.orig/drivers/usb/serial/io_edgeport.c
++++ gregkh-2.6/drivers/usb/serial/io_edgeport.c
+@@ -184,7 +184,7 @@ struct divisor_table_entry {
+ // These assume a 3.6864MHz crystal, the standard /16, and
+ // MCR.7 = 0.
+ //
+-static struct divisor_table_entry divisor_table[] = {
++static const struct divisor_table_entry divisor_table[] = {
+ { 50, 4608},
+ { 75, 3072},
+ { 110, 2095}, /* 2094.545455 => 230450 => .0217 % over */
+--- gregkh-2.6.orig/drivers/usb/serial/io_fw_boot2.h
++++ gregkh-2.6/drivers/usb/serial/io_fw_boot2.h
+@@ -537,7 +537,7 @@ static unsigned char IMAGE_ARRAY_NAME[]
+
+ };
+
+-static struct edge_firmware_version_info IMAGE_VERSION_NAME = {
++static const struct edge_firmware_version_info IMAGE_VERSION_NAME = {
+ 2, 0, 3 }; // Major, Minor, Build
+
+ #undef IMAGE_VERSION_NAME
+--- gregkh-2.6.orig/drivers/usb/serial/safe_serial.c
++++ gregkh-2.6/drivers/usb/serial/safe_serial.c
+@@ -167,7 +167,7 @@ static struct usb_driver safe_driver = {
+ .no_dynamic_id = 1,
+ };
+
+-static __u16 crc10_table[256] = {
++static const __u16 crc10_table[256] = {
+ 0x000, 0x233, 0x255, 0x066, 0x299, 0x0aa, 0x0cc, 0x2ff, 0x301, 0x132, 0x154, 0x367, 0x198, 0x3ab, 0x3cd, 0x1fe,
+ 0x031, 0x202, 0x264, 0x057, 0x2a8, 0x09b, 0x0fd, 0x2ce, 0x330, 0x103, 0x165, 0x356, 0x1a9, 0x39a, 0x3fc, 0x1cf,
+ 0x062, 0x251, 0x237, 0x004, 0x2fb, 0x0c8, 0x0ae, 0x29d, 0x363, 0x150, 0x136, 0x305, 0x1fa, 0x3c9, 0x3af, 0x19c,
+--- gregkh-2.6.orig/drivers/usb/storage/sddr09.c
++++ gregkh-2.6/drivers/usb/storage/sddr09.c
+@@ -237,7 +237,7 @@ static void nand_store_ecc(unsigned char
+ #define SPARE 0xfffffffe
+ #define UNUSABLE 0xfffffffd
+
+-static int erase_bad_lba_entries = 0;
++static const int erase_bad_lba_entries = 0;
+
+ /* send vendor interface command (0x41) */
+ /* called for requests 0, 1, 8 */
+--- gregkh-2.6.orig/drivers/usb/storage/usb.c
++++ gregkh-2.6/drivers/usb/storage/usb.c
+@@ -470,7 +470,7 @@ static void get_device_info(struct us_da
+ * from the unusual_devs.h table.
+ */
+ if (id->idVendor || id->idProduct) {
+- static char *msgs[3] = {
++ static const char *msgs[3] = {
+ "an unneeded SubClass entry",
+ "an unneeded Protocol entry",
+ "unneeded SubClass and Protocol entries"};