diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 15:27:50 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-25 15:27:50 -0700 |
| commit | 8aef04ebc13cf717d1dcdc0ddd598303f240263a (patch) | |
| tree | 0e2c1b053fedf2be79abc61b7f5fb0f07e28b99c | |
| parent | 0650ee5d81f5b64bd1dfc8ffd28fefc6f6ea4c20 (diff) | |
| download | patches-8aef04ebc13cf717d1dcdc0ddd598303f240263a.tar.gz | |
more patches
| -rw-r--r-- | ipaq.patch | 83 | ||||
| -rw-r--r-- | modpost-use-proper-kernel-style-for-autogenerated-files.patch | 47 | ||||
| -rw-r--r-- | printk.patch | 433 | ||||
| -rw-r--r-- | series | 5 | ||||
| -rw-r--r-- | usb-remove-config_usb_device_class.patch | 144 | ||||
| -rw-r--r-- | visor.patch | 125 |
6 files changed, 837 insertions, 0 deletions
diff --git a/ipaq.patch b/ipaq.patch new file mode 100644 index 00000000000000..c708b4f3175be6 --- /dev/null +++ b/ipaq.patch @@ -0,0 +1,83 @@ +From foo@baz Thu Apr 19 15:13:59 PDT 2012 +Date: Thu, 19 Apr 2012 15:13:59 -0700 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: USB: serial: ipaq: remove product and vendor module parameters + +This driver is for devices that are no longer being made, so the ability +to add new device ids when loading the module is not a feature that +anyone uses anymore. So remove it, which simplifies the startup code a +lot, and saves space. + +If you still need to dynamically load device ids, that can be done +through sysfs. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + +--- + drivers/usb/serial/ipaq.c | 33 +-------------------------------- + 1 file changed, 1 insertion(+), 32 deletions(-) + +--- a/drivers/usb/serial/ipaq.c ++++ b/drivers/usb/serial/ipaq.c +@@ -33,7 +33,6 @@ + #define DRIVER_AUTHOR "Ganesh Varadarajan <ganesh@veritas.com>" + #define DRIVER_DESC "USB PocketPC PDA driver" + +-static __u16 product, vendor; + static bool debug; + static int connect_retries = KP_RETRIES; + static int initial_wait; +@@ -45,7 +44,6 @@ static int ipaq_calc_num_ports(struct u + static int ipaq_startup(struct usb_serial *serial); + + static struct usb_device_id ipaq_id_table [] = { +- /* The first entry is a placeholder for the insmod-specified device */ + { USB_DEVICE(0x049F, 0x0003) }, + { USB_DEVICE(0x0104, 0x00BE) }, /* Socket USB Sync */ + { USB_DEVICE(0x03F0, 0x1016) }, /* HP USB Sync */ +@@ -623,30 +621,7 @@ static int ipaq_startup(struct usb_seria + return usb_reset_configuration(serial->dev); + } + +-static int __init ipaq_init(void) +-{ +- int retval; +- +- if (vendor) { +- ipaq_id_table[0].idVendor = vendor; +- ipaq_id_table[0].idProduct = product; +- } +- +- retval = usb_serial_register_drivers(&ipaq_driver, serial_drivers); +- if (retval == 0) +- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" +- DRIVER_DESC "\n"); +- return retval; +-} +- +-static void __exit ipaq_exit(void) +-{ +- usb_serial_deregister_drivers(&ipaq_driver, serial_drivers); +-} +- +- +-module_init(ipaq_init); +-module_exit(ipaq_exit); ++module_usb_serial_driver(ipaq_driver, serial_drivers); + + MODULE_AUTHOR(DRIVER_AUTHOR); + MODULE_DESCRIPTION(DRIVER_DESC); +@@ -655,12 +630,6 @@ MODULE_LICENSE("GPL"); + module_param(debug, bool, S_IRUGO | S_IWUSR); + MODULE_PARM_DESC(debug, "Debug enabled or not"); + +-module_param(vendor, ushort, 0); +-MODULE_PARM_DESC(vendor, "User specified USB idVendor"); +- +-module_param(product, ushort, 0); +-MODULE_PARM_DESC(product, "User specified USB idProduct"); +- + module_param(connect_retries, int, S_IRUGO|S_IWUSR); + MODULE_PARM_DESC(connect_retries, + "Maximum number of connect retries (one second each)"); diff --git a/modpost-use-proper-kernel-style-for-autogenerated-files.patch b/modpost-use-proper-kernel-style-for-autogenerated-files.patch new file mode 100644 index 00000000000000..331a3b1f190e29 --- /dev/null +++ b/modpost-use-proper-kernel-style-for-autogenerated-files.patch @@ -0,0 +1,47 @@ +From foo@baz Wed Apr 25 11:06:38 PDT 2012 +Date: Wed, 25 Apr 2012 11:06:38 -0700 +To: Rusty Russell <rusty@rustcorp.com.au> +Cc: linux-kernel@vger.kernel.org +Cc: Alessio Igor Bogani <abogani@kernel.org> +Cc: Tony Lindgren <tony@atomide.com> +Cc: Ben Hutchings <ben@decadent.org.uk> +Cc: Russell King <rmk+kernel@arm.linux.org.uk> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: [PATCH] modpost: use proper kernel style for autogenerated files + +If the kernel build process is creating files automatically, the least +it can do is create them in a properly formatted manner. Sure, it's a +minor issue, but being consistent is nice. + +Cc: Rusty Russell <rusty@rustcorp.com.au> +Cc: Alessio Igor Bogani <abogani@kernel.org> +Cc: Tony Lindgren <tony@atomide.com> +Cc: Ben Hutchings <ben@decadent.org.uk> +Cc: Russell King <rmk+kernel@arm.linux.org.uk> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + +--- + scripts/mod/modpost.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/scripts/mod/modpost.c ++++ b/scripts/mod/modpost.c +@@ -1850,14 +1850,14 @@ static void add_header(struct buffer *b, + buf_printf(b, "\n"); + buf_printf(b, "struct module __this_module\n"); + buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); +- buf_printf(b, " .name = KBUILD_MODNAME,\n"); ++ buf_printf(b, "\t.name = KBUILD_MODNAME,\n"); + if (mod->has_init) +- buf_printf(b, " .init = init_module,\n"); ++ buf_printf(b, "\t.init = init_module,\n"); + if (mod->has_cleanup) + buf_printf(b, "#ifdef CONFIG_MODULE_UNLOAD\n" +- " .exit = cleanup_module,\n" ++ "\t.exit = cleanup_module,\n" + "#endif\n"); +- buf_printf(b, " .arch = MODULE_ARCH_INIT,\n"); ++ buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n"); + buf_printf(b, "};\n"); + } + diff --git a/printk.patch b/printk.patch new file mode 100644 index 00000000000000..77ee51d54c98c0 --- /dev/null +++ b/printk.patch @@ -0,0 +1,433 @@ +--- + drivers/usb/serial/console.c | 4 +- + drivers/usb/serial/pl2303.c | 84 ++++++++++++++++++++++--------------------- + drivers/usb/serial/visor.c | 28 +++++++------- + 3 files changed, 60 insertions(+), 56 deletions(-) + +--- a/drivers/usb/serial/console.c ++++ b/drivers/usb/serial/console.c +@@ -68,8 +68,6 @@ static int usb_console_setup(struct cons + struct tty_struct *tty = NULL; + struct ktermios dummy; + +- dbg("%s", __func__); +- + if (options) { + baud = simple_strtoul(options, NULL, 10); + s = options; +@@ -117,6 +115,8 @@ static int usb_console_setup(struct cons + return -ENODEV; + } + ++ dev_dbg(&serial->dev->dev, "%s\n", __func__); ++ + retval = usb_autopm_get_interface(serial->interface); + if (retval) + goto error_get_interface; +--- a/drivers/usb/serial/pl2303.c ++++ b/drivers/usb/serial/pl2303.c +@@ -161,8 +161,9 @@ static int pl2303_vendor_read(__u16 valu + int res = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), + VENDOR_READ_REQUEST, VENDOR_READ_REQUEST_TYPE, + value, index, buf, 1, 100); +- dbg("0x%x:0x%x:0x%x:0x%x %d - %x", VENDOR_READ_REQUEST_TYPE, +- VENDOR_READ_REQUEST, value, index, res, buf[0]); ++ dev_dbg(&serial->dev->dev, "0x%x:0x%x:0x%x:0x%x %d - %x\n", ++ VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, value, index, ++ res, buf[0]); + return res; + } + +@@ -172,8 +173,9 @@ static int pl2303_vendor_write(__u16 val + int res = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE, + value, index, NULL, 0, 100); +- dbg("0x%x:0x%x:0x%x:0x%x %d", VENDOR_WRITE_REQUEST_TYPE, +- VENDOR_WRITE_REQUEST, value, index, res); ++ dev_dbg(&serial->dev->dev, "0x%x:0x%x:0x%x:0x%x %d\n", ++ VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, value, index, ++ res); + return res; + } + +@@ -196,7 +198,7 @@ static int pl2303_startup(struct usb_ser + type = type_1; + else if (serial->dev->descriptor.bDeviceClass == 0xFF) + type = type_1; +- dbg("device type: %d", type); ++ dev_dbg(&serial->interface->dev, "device type: %d\n", type); + + for (i = 0; i < serial->num_ports; ++i) { + priv = kzalloc(sizeof(struct pl2303_private), GFP_KERNEL); +@@ -243,7 +245,8 @@ static int set_control_lines(struct usb_ + retval = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + SET_CONTROL_REQUEST, SET_CONTROL_REQUEST_TYPE, + value, 0, NULL, 0, 100); +- dbg("%s - value = %d, retval = %d", __func__, value, retval); ++ dev_dbg(&dev->dev, "%s - value = %d, retval = %d\n", __func__, ++ value, retval); + return retval; + } + +@@ -265,7 +268,7 @@ static void pl2303_set_termios(struct tt + int baud_floor, baud_ceil; + int k; + +- dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + /* The PL2303 is reported to lose bytes if you change + serial settings even to the same values as before. Thus +@@ -287,7 +290,7 @@ static void pl2303_set_termios(struct tt + i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), + GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, + 0, 0, buf, 7, 100); +- dbg("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i, ++ dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x\n", i, + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); + + if (cflag & CSIZE) { +@@ -306,7 +309,7 @@ static void pl2303_set_termios(struct tt + buf[6] = 8; + break; + } +- dbg("%s - data bits = %d", __func__, buf[6]); ++ dev_dbg(&port->dev, "data bits = %d\n", buf[6]); + } + + /* For reference buf[0]:buf[3] baud rate value */ +@@ -315,7 +318,7 @@ static void pl2303_set_termios(struct tt + * 9600 baud (at least my PL2303X always does) + */ + baud = tty_get_baud_rate(tty); +- dbg("%s - baud requested = %d", __func__, baud); ++ dev_dbg(&port->dev, "baud requested = %d\n", baud); + if (baud) { + /* Set baudrate to nearest supported value */ + for (k=0; k<ARRAY_SIZE(baud_sup); k++) { +@@ -341,7 +344,7 @@ static void pl2303_set_termios(struct tt + else if (baud > 6000000) + baud = 6000000; + } +- dbg("%s - baud set = %d", __func__, baud); ++ dev_dbg(&port->dev, "baud set = %d\n", baud); + if (baud <= 115200) { + buf[0] = baud & 0xff; + buf[1] = (baud >> 8) & 0xff; +@@ -372,14 +375,14 @@ static void pl2303_set_termios(struct tt + */ + if ((cflag & CSIZE) == CS5) { + buf[4] = 1; +- dbg("%s - stop bits = 1.5", __func__); ++ dev_dbg(&port->dev, "stop bits = 1.5\n"); + } else { + buf[4] = 2; +- dbg("%s - stop bits = 2", __func__); ++ dev_dbg(&port->dev, "stop bits = 2\n"); + } + } else { + buf[4] = 0; +- dbg("%s - stop bits = 1", __func__); ++ dev_dbg(&port->dev, "stop bits = 1\n"); + } + + if (cflag & PARENB) { +@@ -391,29 +394,29 @@ static void pl2303_set_termios(struct tt + if (cflag & PARODD) { + if (cflag & CMSPAR) { + buf[5] = 3; +- dbg("%s - parity = mark", __func__); ++ dev_dbg(&port->dev, "parity = mark\n"); + } else { + buf[5] = 1; +- dbg("%s - parity = odd", __func__); ++ dev_dbg(&port->dev, "parity = odd\n"); + } + } else { + if (cflag & CMSPAR) { + buf[5] = 4; +- dbg("%s - parity = space", __func__); ++ dev_dbg(&port->dev, "parity = space\n"); + } else { + buf[5] = 2; +- dbg("%s - parity = even", __func__); ++ dev_dbg(&port->dev, "parity = even\n"); + } + } + } else { + buf[5] = 0; +- dbg("%s - parity = none", __func__); ++ dev_dbg(&port->dev, "parity = none\n"); + } + + i = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + SET_LINE_REQUEST, SET_LINE_REQUEST_TYPE, + 0, 0, buf, 7, 100); +- dbg("0x21:0x20:0:0 %d", i); ++ dev_dbg(&port->dev, "0x21:0x20:0:0 %d\n", i); + + /* change control lines if we are switching to or from B0 */ + spin_lock_irqsave(&priv->lock, flags); +@@ -435,7 +438,7 @@ static void pl2303_set_termios(struct tt + i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), + GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, + 0, 0, buf, 7, 100); +- dbg("0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x", i, ++ dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x\n", i, + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]); + + if (cflag & CRTSCTS) { +@@ -473,7 +476,7 @@ static void pl2303_dtr_rts(struct usb_se + + static void pl2303_close(struct usb_serial_port *port) + { +- dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + usb_serial_generic_close(port); + usb_kill_urb(port->interrupt_in_urb); +@@ -486,7 +489,7 @@ static int pl2303_open(struct tty_struct + struct pl2303_private *priv = usb_get_serial_port_data(port); + int result; + +- dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + if (priv->type != HX) { + usb_clear_halt(serial->dev, port->write_urb->pipe); +@@ -501,7 +504,7 @@ static int pl2303_open(struct tty_struct + if (tty) + pl2303_set_termios(tty, port, &tmp_termios); + +- dbg("%s - submitting interrupt urb", __func__); ++ dev_dbg(&port->dev, "submitting interrupt urb\n"); + result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); + if (result) { + dev_err(&port->dev, "%s - failed submitting interrupt urb," +@@ -554,7 +557,7 @@ static int pl2303_tiocmget(struct tty_st + unsigned int status; + unsigned int result; + +- dbg("%s (%d)", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + if (!usb_get_intfdata(port->serial->interface)) + return -ENODEV; +@@ -571,7 +574,7 @@ static int pl2303_tiocmget(struct tty_st + | ((status & UART_RING) ? TIOCM_RI : 0) + | ((status & UART_DCD) ? TIOCM_CD : 0); + +- dbg("%s - result = %x", __func__, result); ++ dev_dbg(&port->dev, "%s - result = %x\n", __func__, result); + + return result; + } +@@ -625,7 +628,8 @@ static int pl2303_ioctl(struct tty_struc + { + struct serial_struct ser; + struct usb_serial_port *port = tty->driver_data; +- dbg("%s (%d) cmd = 0x%04x", __func__, port->number, cmd); ++ ++ dev_dbg(&port->dev, "%s cmd = 0x%04x\n", __func__, cmd); + + switch (cmd) { + case TIOCGSERIAL: +@@ -641,10 +645,10 @@ static int pl2303_ioctl(struct tty_struc + return 0; + + case TIOCMIWAIT: +- dbg("%s (%d) TIOCMIWAIT", __func__, port->number); ++ dev_dbg(&port->dev, "%s TIOCMIWAIT\n", __func__); + return wait_modem_info(port, arg); + default: +- dbg("%s not supported = 0x%04x", __func__, cmd); ++ dev_dbg(&port->dev, "%s not supported = 0x%04x\n", __func__, cmd); + break; + } + return -ENOIOCTLCMD; +@@ -657,20 +661,20 @@ static void pl2303_break_ctl(struct tty_ + u16 state; + int result; + +- dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + if (break_state == 0) + state = BREAK_OFF; + else + state = BREAK_ON; +- dbg("%s - turning break %s", __func__, ++ dev_dbg(&port->dev, "%s - turning break %s\n", __func__, + state == BREAK_OFF ? "off" : "on"); + + result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + BREAK_REQUEST, BREAK_REQUEST_TYPE, state, + 0, NULL, 0, 100); + if (result) +- dbg("%s - error sending break = %d", __func__, result); ++ dev_err(&port->dev, "error sending break = %d\n", result); + } + + static void pl2303_release(struct usb_serial *serial) +@@ -678,7 +682,7 @@ static void pl2303_release(struct usb_se + int i; + struct pl2303_private *priv; + +- dbg("%s", __func__); ++ dev_dbg(&serial->dev->dev, "%s\n", __func__); + + for (i = 0; i < serial->num_ports; ++i) { + priv = usb_get_serial_port_data(serial->port[i]); +@@ -742,7 +746,7 @@ static void pl2303_read_int_callback(str + int status = urb->status; + int retval; + +- dbg("%s (%d)", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + switch (status) { + case 0: +@@ -752,12 +756,12 @@ static void pl2303_read_int_callback(str + case -ENOENT: + case -ESHUTDOWN: + /* this urb is terminated, clean up */ +- dbg("%s - urb shutting down with status: %d", __func__, +- status); ++ dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n", ++ __func__, status); + return; + default: +- dbg("%s - nonzero urb status received: %d", __func__, +- status); ++ dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n", ++ __func__, status); + goto exit; + } + +@@ -769,7 +773,7 @@ static void pl2303_read_int_callback(str + exit: + retval = usb_submit_urb(urb, GFP_ATOMIC); + if (retval) +- dev_err(&urb->dev->dev, ++ dev_err(&port->dev, + "%s - usb_submit_urb failed with result %d\n", + __func__, retval); + } +@@ -807,7 +811,7 @@ static void pl2303_process_read_urb(stru + tty_flag = TTY_PARITY; + else if (line_status & UART_FRAME_ERROR) + tty_flag = TTY_FRAME; +- dbg("%s - tty_flag = %d", __func__, tty_flag); ++ dev_dbg(&port->dev, "%s - tty_flag = %d\n", __func__, tty_flag); + + /* overrun is special, not associated with a char */ + if (line_status & UART_OVERRUN_ERROR) +--- a/drivers/usb/serial/visor.c ++++ b/drivers/usb/serial/visor.c +@@ -244,7 +244,7 @@ static int visor_open(struct tty_struct + { + int result = 0; + +- dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + if (!port->read_urb) { + /* this is needed for some brain dead Sony devices */ +@@ -258,7 +258,7 @@ static int visor_open(struct tty_struct + goto exit; + + if (port->interrupt_in_urb) { +- dbg("%s - adding interrupt input for treo", __func__); ++ dev_dbg(&port->dev, "adding interrupt input for treo\n"); + result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); + if (result) + dev_err(&port->dev, +@@ -274,7 +274,7 @@ static void visor_close(struct usb_seria + { + unsigned char *transfer_buffer; + +- dbg("%s - port %d", __func__, port->number); ++ dev_dbg(&port->dev, "%s\n", __func__); + + /* shutdown our urbs */ + usb_serial_generic_close(port); +@@ -310,12 +310,12 @@ static void visor_read_int_callback(stru + case -ENOENT: + case -ESHUTDOWN: + /* this urb is terminated, clean up */ +- dbg("%s - urb shutting down with status: %d", +- __func__, status); ++ dev_dbg(&port->dev, "%s - urb shutting down with status: %d\n", ++ __func__, status); + return; + default: +- dbg("%s - nonzero urb status received: %d", +- __func__, status); ++ dev_dbg(&port->dev, "%s - nonzero urb status received: %d\n", ++ __func__, status); + goto exit; + } + +@@ -348,7 +348,7 @@ static int palm_os_3_probe(struct usb_se + int i; + int num_ports = 0; + +- dbg("%s", __func__); ++ dev_dbg(dev, "%s\n", __func__); + + transfer_buffer = kmalloc(sizeof(*connection_info), GFP_KERNEL); + if (!transfer_buffer) { +@@ -445,7 +445,7 @@ static int palm_os_4_probe(struct usb_se + unsigned char *transfer_buffer; + int retval; + +- dbg("%s", __func__); ++ dev_dbg(dev, "%s\n", __func__); + + transfer_buffer = kmalloc(sizeof(*connection_info), GFP_KERNEL); + if (!transfer_buffer) { +@@ -478,7 +478,7 @@ static int visor_probe(struct usb_serial + int (*startup)(struct usb_serial *serial, + const struct usb_device_id *id); + +- dbg("%s", __func__); ++ dev_dbg(&serial->dev->dev, "%s\n", __func__); + + /* + * some Samsung Android phones in modem mode have the same ID +@@ -521,7 +521,7 @@ static int clie_3_5_startup(struct usb_s + int result; + u8 *data; + +- dbg("%s", __func__); ++ dev_dbg(dev, "%s\n", __func__); + + data = kmalloc(1, GFP_KERNEL); + if (!data) +@@ -576,6 +576,8 @@ static int treo_attach(struct usb_serial + { + struct usb_serial_port *swap_port; + ++ dev_dbg(&serial->dev->dev, "%s\n", __func__); ++ + /* Only do this endpoint hack for the Handspring devices with + * interrupt in endpoints, which for now are the Treo devices. */ + if (!((le16_to_cpu(serial->dev->descriptor.idVendor) +@@ -585,8 +587,6 @@ static int treo_attach(struct usb_serial + (serial->num_interrupt_in == 0)) + return 0; + +- dbg("%s", __func__); +- + /* + * It appears that Treos and Kyoceras want to use the + * 1st bulk in endpoint to communicate with the 2nd bulk out endpoint, +@@ -622,7 +622,7 @@ static int clie_5_attach(struct usb_seri + unsigned int pipe; + int j; + +- dbg("%s", __func__); ++ dev_dbg(&port->dev, "%s\n", __func__); + + /* TH55 registers 2 ports. + Communication in from the UX50/TH55 uses bulk_in_endpointAddress @@ -1,4 +1,9 @@ # My specific stuff, at the top to make it easier to work stuff below. +modpost-use-proper-kernel-style-for-autogenerated-files.patch +usb-remove-config_usb_device_class.patch +printk.patch +ipaq.patch +visor.patch driver.patch mce2.patch gregkh/gkh-version.patch diff --git a/usb-remove-config_usb_device_class.patch b/usb-remove-config_usb_device_class.patch new file mode 100644 index 00000000000000..b316061672dd3c --- /dev/null +++ b/usb-remove-config_usb_device_class.patch @@ -0,0 +1,144 @@ +From foo@baz Wed Apr 25 15:23:48 PDT 2012 +Date: Wed, 25 Apr 2012 15:23:48 -0700 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: [RFC PATCH] USB: remove CONFIG_USB_DEVICE_CLASS + +This option has been deprecated for many years now, and no userspace +tools use it anymore, so it should be safe to finally remove it. + +Reported-by: Kay Sievers <kay@vrfy.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + +--- + +Anyone object to me queuing this up for the 3.5 kernel release? + + drivers/usb/core/Kconfig | 23 ---------------------- + drivers/usb/core/devio.c | 49 ----------------------------------------------- + include/linux/usb.h | 3 -- + 3 files changed, 75 deletions(-) + +--- a/drivers/usb/core/Kconfig ++++ b/drivers/usb/core/Kconfig +@@ -56,29 +56,6 @@ config USB_DEVICEFS + The usbfs functionality is replaced by real device-nodes managed by + udev. These nodes lived in /dev/bus/usb and are used by libusb. + +-config USB_DEVICE_CLASS +- bool "USB device class-devices (DEPRECATED)" +- depends on USB +- default y +- ---help--- +- Userspace access to USB devices is granted by device-nodes exported +- directly from the usbdev in sysfs. Old versions of the driver +- core and udev needed additional class devices to export device nodes. +- +- These additional devices are difficult to handle in userspace, if +- information about USB interfaces must be available. One device +- contains the device node, the other device contains the interface +- data. Both devices are at the same level in sysfs (siblings) and one +- can't access the other. The device node created directly by the +- usb device is the parent device of the interface and therefore +- easily accessible from the interface event. +- +- This option provides backward compatibility for libusb device +- nodes (lsusb) when usbfs is not used, and the following udev rule +- doesn't exist: +- SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ +- NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" +- + config USB_DYNAMIC_MINORS + bool "Dynamic USB minor allocation" + depends on USB +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -2062,44 +2062,13 @@ static void usbdev_remove(struct usb_dev + } + } + +-#ifdef CONFIG_USB_DEVICE_CLASS +-static struct class *usb_classdev_class; +- +-static int usb_classdev_add(struct usb_device *dev) +-{ +- struct device *cldev; +- +- cldev = device_create(usb_classdev_class, &dev->dev, dev->dev.devt, +- NULL, "usbdev%d.%d", dev->bus->busnum, +- dev->devnum); +- if (IS_ERR(cldev)) +- return PTR_ERR(cldev); +- dev->usb_classdev = cldev; +- return 0; +-} +- +-static void usb_classdev_remove(struct usb_device *dev) +-{ +- if (dev->usb_classdev) +- device_unregister(dev->usb_classdev); +-} +- +-#else +-#define usb_classdev_add(dev) 0 +-#define usb_classdev_remove(dev) do {} while (0) +- +-#endif +- + static int usbdev_notify(struct notifier_block *self, + unsigned long action, void *dev) + { + switch (action) { + case USB_DEVICE_ADD: +- if (usb_classdev_add(dev)) +- return NOTIFY_BAD; + break; + case USB_DEVICE_REMOVE: +- usb_classdev_remove(dev); + usbdev_remove(dev); + break; + } +@@ -2129,21 +2098,6 @@ int __init usb_devio_init(void) + USB_DEVICE_MAJOR); + goto error_cdev; + } +-#ifdef CONFIG_USB_DEVICE_CLASS +- usb_classdev_class = class_create(THIS_MODULE, "usb_device"); +- if (IS_ERR(usb_classdev_class)) { +- printk(KERN_ERR "Unable to register usb_device class\n"); +- retval = PTR_ERR(usb_classdev_class); +- cdev_del(&usb_device_cdev); +- usb_classdev_class = NULL; +- goto out; +- } +- /* devices of this class shadow the major:minor of their parent +- * device, so clear ->dev_kobj to prevent adding duplicate entries +- * to /sys/dev +- */ +- usb_classdev_class->dev_kobj = NULL; +-#endif + usb_register_notify(&usbdev_nb); + out: + return retval; +@@ -2156,9 +2110,6 @@ error_cdev: + void usb_devio_cleanup(void) + { + usb_unregister_notify(&usbdev_nb); +-#ifdef CONFIG_USB_DEVICE_CLASS +- class_destroy(usb_classdev_class); +-#endif + cdev_del(&usb_device_cdev); + unregister_chrdev_region(USB_DEVICE_DEV, USB_DEVICE_MAX); + } +--- a/include/linux/usb.h ++++ b/include/linux/usb.h +@@ -493,9 +493,6 @@ struct usb_device { + char *serial; + + struct list_head filelist; +-#ifdef CONFIG_USB_DEVICE_CLASS +- struct device *usb_classdev; +-#endif + #ifdef CONFIG_USB_DEVICEFS + struct dentry *usbfs_dentry; + #endif diff --git a/visor.patch b/visor.patch new file mode 100644 index 00000000000000..b298073023b20e --- /dev/null +++ b/visor.patch @@ -0,0 +1,125 @@ +From foo@baz Thu Apr 19 15:15:43 PDT 2012 +Date: Thu, 19 Apr 2012 15:15:43 -0700 +To: Greg KH <gregkh@linuxfoundation.org> +From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> +Subject: USB: serial: visor: remove product and vendor module parameters + +This driver is for devices that are no longer being made, so the ability +to add new device ids when loading the module is not a feature that +anyone uses anymore. So remove it, which simplifies the startup code a +lot, and saves space. + +If you still need to dynamically load device ids, that can be done +through sysfs. + +Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> + +--- + drivers/usb/serial/visor.c | 65 --------------------------------------------- + 1 file changed, 1 insertion(+), 64 deletions(-) + +--- a/drivers/usb/serial/visor.c ++++ b/drivers/usb/serial/visor.c +@@ -53,8 +53,6 @@ static int palm_os_4_probe(struct usb_se + + /* Parameters that may be passed into the module. */ + static bool debug; +-static __u16 vendor; +-static __u16 product; + + static struct usb_device_id id_table [] = { + { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID), +@@ -115,14 +113,12 @@ static struct usb_device_id id_table [] + .driver_info = (kernel_ulong_t)&palm_os_4_probe }, + { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID), + .driver_info = (kernel_ulong_t)&palm_os_4_probe }, +- { }, /* optional parameter entry */ + { } /* Terminating entry */ + }; + + static struct usb_device_id clie_id_5_table [] = { + { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_UX50_ID), + .driver_info = (kernel_ulong_t)&palm_os_4_probe }, +- { }, /* optional parameter entry */ + { } /* Terminating entry */ + }; + +@@ -162,7 +158,6 @@ static struct usb_device_id id_table_com + { USB_DEVICE(ACEECA_VENDOR_ID, ACEECA_MEZ1000_ID) }, + { USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_7135_ID) }, + { USB_DEVICE(FOSSIL_VENDOR_ID, FOSSIL_ABACUS_ID) }, +- { }, /* optional parameter entry */ + { } /* Terminating entry */ + }; + +@@ -648,59 +643,7 @@ static int clie_5_attach(struct usb_seri + return 0; + } + +-static int __init visor_init(void) +-{ +- int i, retval; +- /* Only if parameters were passed to us */ +- if (vendor > 0 && product > 0) { +- struct usb_device_id usb_dev_temp[] = { +- { +- USB_DEVICE(vendor, product), +- .driver_info = +- (kernel_ulong_t) &palm_os_4_probe +- } +- }; +- +- /* Find the last entry in id_table */ +- for (i = 0;; i++) { +- if (id_table[i].idVendor == 0) { +- id_table[i] = usb_dev_temp[0]; +- break; +- } +- } +- /* Find the last entry in id_table_combined */ +- for (i = 0;; i++) { +- if (id_table_combined[i].idVendor == 0) { +- id_table_combined[i] = usb_dev_temp[0]; +- break; +- } +- } +- printk(KERN_INFO KBUILD_MODNAME +- ": Untested USB device specified at time of module insertion\n"); +- printk(KERN_INFO KBUILD_MODNAME +- ": Warning: This is not guaranteed to work\n"); +- printk(KERN_INFO KBUILD_MODNAME +- ": Using a newer kernel is preferred to this method\n"); +- printk(KERN_INFO KBUILD_MODNAME +- ": Adding Palm OS protocol 4.x support for unknown device: 0x%x/0x%x\n", +- vendor, product); +- } +- +- retval = usb_serial_register_drivers(&visor_driver, serial_drivers); +- if (retval == 0) +- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); +- return retval; +-} +- +- +-static void __exit visor_exit (void) +-{ +- usb_serial_deregister_drivers(&visor_driver, serial_drivers); +-} +- +- +-module_init(visor_init); +-module_exit(visor_exit); ++module_usb_serial_driver(visor_driver, serial_drivers); + + MODULE_AUTHOR(DRIVER_AUTHOR); + MODULE_DESCRIPTION(DRIVER_DESC); +@@ -708,9 +651,3 @@ MODULE_LICENSE("GPL"); + + module_param(debug, bool, S_IRUGO | S_IWUSR); + MODULE_PARM_DESC(debug, "Debug enabled or not"); +- +-module_param(vendor, ushort, 0); +-MODULE_PARM_DESC(vendor, "User specified vendor ID"); +-module_param(product, ushort, 0); +-MODULE_PARM_DESC(product, "User specified product ID"); +- |
