Hi,
Here's a patch against 2.5.1-pre2 that merges together some of the USB
visor driver device structures.
thanks,
greg k-h
diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
--- a/drivers/usb/serial/visor.c Tue Nov 27 21:59:38 2001
+++ b/drivers/usb/serial/visor.c Tue Nov 27 21:59:38 2001
@@ -127,7 +127,7 @@
/*
* Version Information
*/
-#define DRIVER_VERSION "v1.5"
+#define DRIVER_VERSION "v1.6"
#define DRIVER_AUTHOR "Greg Kroah-Hartman <[EMAIL PROTECTED]>"
#define DRIVER_DESC "USB HandSpring Visor, Palm m50x, Sony Cli� driver"
@@ -147,15 +147,12 @@
static void visor_read_bulk_callback (struct urb *urb);
-static __devinitdata struct usb_device_id visor_id_table [] = {
- { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
- { } /* Terminating entry */
-};
-
-static __devinitdata struct usb_device_id palm_4_0_id_table [] = {
+static __devinitdata struct usb_device_id combined_id_table [] = {
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M125_ID) },
+ { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
+ { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
{ } /* Terminating entry */
};
@@ -164,11 +161,6 @@
{ } /* Terminating entry */
};
-static __devinitdata struct usb_device_id clie_id_4_0_table [] = {
- { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) },
- { } /* Terminating entry */
-};
-
static __devinitdata struct usb_device_id id_table [] = {
{ USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) },
{ USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) },
@@ -183,39 +175,10 @@
-/* All of the device info needed for the Handspring Visor */
+/* All of the device info needed for the Handspring Visor, and Palm 4.0 devices */
static struct usb_serial_device_type handspring_device = {
- name: "Handspring Visor",
- id_table: visor_id_table,
- needs_interrupt_in: MUST_HAVE_NOT, /* this device must not have
an interrupt in endpoint */
- needs_bulk_in: MUST_HAVE, /* this device must have a
bulk in endpoint */
- needs_bulk_out: MUST_HAVE, /* this device must have a
bulk out endpoint */
- num_interrupt_in: 0,
- num_bulk_in: 2,
- num_bulk_out: 2,
- num_ports: 2,
- open: visor_open,
- close: visor_close,
- throttle: visor_throttle,
- unthrottle: visor_unthrottle,
- startup: visor_startup,
- shutdown: visor_shutdown,
- ioctl: visor_ioctl,
- set_termios: visor_set_termios,
- write: visor_write,
- write_room: visor_write_room,
- chars_in_buffer: visor_chars_in_buffer,
- write_bulk_callback: visor_write_bulk_callback,
- read_bulk_callback: visor_read_bulk_callback,
-};
-
-/* device info for the Palm 4.0 devices */
-static struct usb_serial_device_type palm_4_0_device = {
- name: "Palm 4.0",
- id_table: palm_4_0_id_table,
- needs_interrupt_in: MUST_HAVE_NOT, /* this device must not have
an interrupt in endpoint */
- needs_bulk_in: MUST_HAVE, /* this device must have a
bulk in endpoint */
- needs_bulk_out: MUST_HAVE, /* this device must have a
bulk out endpoint */
+ name: "Handspring Visor / Palm 4.0 / Cli� 4.0",
+ id_table: combined_id_table,
num_interrupt_in: 0,
num_bulk_in: 2,
num_bulk_out: 2,
@@ -235,14 +198,10 @@
read_bulk_callback: visor_read_bulk_callback,
};
-
/* device info for the Sony Clie OS version 3.5 */
static struct usb_serial_device_type clie_3_5_device = {
name: "Sony Cli� 3.5",
id_table: clie_id_3_5_table,
- needs_interrupt_in: MUST_HAVE_NOT, /* this device must not have
an interrupt in endpoint */
- needs_bulk_in: MUST_HAVE, /* this device must have a
bulk in endpoint */
- needs_bulk_out: MUST_HAVE, /* this device must have a
bulk out endpoint */
num_interrupt_in: 0,
num_bulk_in: 1,
num_bulk_out: 1,
@@ -260,31 +219,6 @@
read_bulk_callback: visor_read_bulk_callback,
};
-/* device info for the Sony Clie OS version 4.0 */
-static struct usb_serial_device_type clie_4_0_device = {
- name: "Sony Cli� 4.0",
- id_table: clie_id_4_0_table,
- needs_interrupt_in: MUST_HAVE_NOT, /* this device must not have
an interrupt in endpoint */
- needs_bulk_in: MUST_HAVE, /* this device must have a
bulk in endpoint */
- needs_bulk_out: MUST_HAVE, /* this device must have a
bulk out endpoint */
- num_interrupt_in: 0,
- num_bulk_in: 2,
- num_bulk_out: 2,
- num_ports: 2,
- open: visor_open,
- close: visor_close,
- throttle: visor_throttle,
- unthrottle: visor_unthrottle,
- startup: visor_startup,
- shutdown: visor_shutdown,
- ioctl: visor_ioctl,
- set_termios: visor_set_termios,
- write: visor_write,
- write_room: visor_write_room,
- chars_in_buffer: visor_chars_in_buffer,
- write_bulk_callback: visor_write_bulk_callback,
- read_bulk_callback: visor_read_bulk_callback,
-};
#define NUM_URBS 24
#define URB_TRANSFER_BUFFER_SIZE 768
@@ -801,9 +735,7 @@
int i;
usb_serial_register (&handspring_device);
- usb_serial_register (&palm_4_0_device);
usb_serial_register (&clie_3_5_device);
- usb_serial_register (&clie_4_0_device);
/* create our write urb pool and transfer buffers */
spin_lock_init (&write_urb_pool_lock);
@@ -835,9 +767,7 @@
unsigned long flags;
usb_serial_deregister (&handspring_device);
- usb_serial_deregister (&palm_4_0_device);
usb_serial_deregister (&clie_3_5_device);
- usb_serial_deregister (&clie_4_0_device);
spin_lock_irqsave (&write_urb_pool_lock, flags);
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel