ChangeSet 1.798, 2002/12/05 14:22:42-08:00, [EMAIL PROTECTED]

[PATCH] USB: tiglusb sync with 2.5



diff -Nru a/drivers/usb/tiglusb.c b/drivers/usb/tiglusb.c
--- a/drivers/usb/tiglusb.c     Thu Dec  5 14:48:14 2002
+++ b/drivers/usb/tiglusb.c     Thu Dec  5 14:48:14 2002
@@ -14,17 +14,11 @@
  * and the website at:  http://lpg.ticalc.org/prj_usb/
  * for more info.
  *
- * History :
- *  16/07/2002 : v1.04 -- Julien BLACHE <[EMAIL PROTECTED]>
- *    + removed useless usblp_cleanup()
- *    + removed {un,}lock_kernel() as suggested on lkml
- *    + inlined clear_pipes() (used once)
- *    + inlined clear_device() (small, used twice)
- *    + removed tiglusb_find_struct() (used once, simple code)
- *    + replaced down() with down_interruptible() wherever possible
- *    + fixed double unregistering wrt devfs, causing devfs
- *      to force an oops when the device is deconnected
- *    + removed unused fields from struct tiglusb_t
+ *   1.0x, Romain & Julien: initial submit.
+ *   1.03, Greg Kroah: modifications.
+ *   1.04, Julien: clean-up & fixes; Romain: 2.4 backport.
+ *   1.05, Randy Dunlap: bug fix with the timeout parameter (divide-by-zero).
+ *   1.06, Romain: synched with 2.5, version/firmware changed (confusing).
  */
 
 #include <linux/module.h>
@@ -44,7 +38,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "1.04"
+#define DRIVER_VERSION "1.06"
 #define DRIVER_AUTHOR  "Romain Lievin <[EMAIL PROTECTED]> & Julien Blache 
<[EMAIL PROTECTED]>"
 #define DRIVER_DESC    "TI-GRAPH LINK USB (aka SilverLink) driver"
 #define DRIVER_LICENSE "GPL"
@@ -315,6 +309,7 @@
 /* ----- kernel module registering ------------------------------------ */
 
 static struct file_operations tiglusb_fops = {
+       .owner =        THIS_MODULE,
        .llseek =       no_llseek,
        .read =         tiglusb_read,
        .write =        tiglusb_write,
@@ -385,7 +380,7 @@
                            &tiglusb_fops, NULL);
 
        /* Display firmware version */
-       info ("link cable version %i.%02x",
+       info ("firmware revision %i.%02x",
                dev->descriptor.bcdDevice >> 8,
                dev->descriptor.bcdDevice & 0xff);
 
@@ -424,6 +419,7 @@
 MODULE_DEVICE_TABLE (usb, tiglusb_ids);
 
 static struct usb_driver tiglusb_driver = {
+       .owner =        THIS_MODULE,
        .name =         "tiglusb",
        .probe =        tiglusb_probe,
        .disconnect =   tiglusb_disconnect,
@@ -470,9 +466,11 @@
                init_waitqueue_head (&s->wait);
                init_waitqueue_head (&s->remove_ok);
        }
+       if (timeout <= 0)
+               timeout = TIMAXTIME;
 
        /* register device */
-       if (devfs_register_chrdev (TIUSB_MAJOR, "tiglusb", &tiglusb_fops)) {
+       if (register_chrdev (TIUSB_MAJOR, "tiglusb", &tiglusb_fops)) {
                err ("unable to get major %d", TIUSB_MAJOR);
                return -EIO;
        }
@@ -483,11 +481,14 @@
        /* register USB module */
        result = usb_register (&tiglusb_driver);
        if (result < 0) {
-               devfs_unregister_chrdev (TIUSB_MAJOR, "tiglusb");
+               unregister_chrdev (TIUSB_MAJOR, "tiglusb");
                return -1;
        }
 
-       info (DRIVER_DESC ", " DRIVER_VERSION);
+       info (DRIVER_DESC ", version " DRIVER_VERSION);
+
+       if (timeout <= 0)
+               timeout = TIMAXTIME;
 
        if (!timeout)
                timeout = TIMAXTIME;
@@ -500,7 +501,7 @@
 {
        usb_deregister (&tiglusb_driver);
        devfs_unregister (devfs_handle);
-       devfs_unregister_chrdev (TIUSB_MAJOR, "tiglusb");
+       unregister_chrdev (TIUSB_MAJOR, "tiglusb");
 }
 
 /* --------------------------------------------------------------------- */


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to