]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/tm6000/tm6000-core.c
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / drivers / staging / tm6000 / tm6000-core.c
index 9b451018ef981bcb37942f6db601bd5ead0080cf..40a0206e2432a15f0766649aea0287b9d967976d 100644 (file)
 #include <media/v4l2-common.h>
 #include <media/tuner.h>
 
-#define USB_TIMEOUT    5*HZ /* ms */
+#define USB_TIMEOUT    (5 * HZ) /* ms */
 
 int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
                          u16 value, u16 index, u8 *buf, u16 len)
 {
        int          ret, i;
        unsigned int pipe;
-       static int   ini = 0, last = 0, n = 0;
        u8           *data = NULL;
 
        if (len)
@@ -52,19 +51,12 @@ int tm6000_read_write_usb(struct tm6000_core *dev, u8 req_type, u8 req,
        }
 
        if (tm6000_debug & V4L2_DEBUG_I2C) {
-               if (!ini)
-                       last = ini = jiffies;
+               printk("(dev %p, pipe %08x): ", dev->udev, pipe);
 
-               printk("%06i (dev %p, pipe %08x): ", n, dev->udev, pipe);
-
-               printk("%s: %06u ms %06u ms %02x %02x %02x %02x %02x %02x %02x %02x ",
+               printk("%s: %02x %02x %02x %02x %02x %02x %02x %02x ",
                        (req_type & USB_DIR_IN) ? " IN" : "OUT",
-                       jiffies_to_msecs(jiffies-last),
-                       jiffies_to_msecs(jiffies-ini),
                        req_type, req, value&0xff, value>>8, index&0xff,
                        index>>8, len&0xff, len>>8);
-               last = jiffies;
-               n++;
 
                if (!(req_type & USB_DIR_IN)) {
                        printk(">>> ");
@@ -683,10 +675,8 @@ void tm6000_unregister_extension(struct tm6000_ops *ops)
        struct tm6000_core *dev = NULL;
 
        mutex_lock(&tm6000_devlist_mutex);
-       list_for_each_entry(dev, &tm6000_devlist, devlist) {
-               if (dev)
-                       ops->fini(dev);
-       }
+       list_for_each_entry(dev, &tm6000_devlist, devlist)
+               ops->fini(dev);
 
        printk(KERN_INFO "tm6000: Remove (%s) extension\n", ops->name);
        list_del(&ops->next);