[media] tm6000: Fix check for interrupt endpoint
authorThierry Reding <thierry.reding@avionic-design.de>
Tue, 6 Dec 2011 12:39:35 +0000 (09:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 11 Dec 2011 12:47:37 +0000 (10:47 -0200)
Checking for &dev->int_in is useless because it returns the address of
the embedded struct tm6000_endpoint, which will always be positive and
therefore true.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/tm6000/tm6000-input.c
drivers/media/video/tm6000/tm6000-video.c

index af4bcf5288a9aa1e5abe6f9a03c669ae30d39827..89e003c0cfeded6a909caa02f97d85d2bc2e12ff 100644 (file)
@@ -426,7 +426,7 @@ int tm6000_ir_init(struct tm6000_core *dev)
        rc->scanmask = 0xffff;
        rc->priv = ir;
        rc->change_protocol = tm6000_ir_change_protocol;
-       if (&dev->int_in) {
+       if (dev->int_in.endp) {
                rc->open    = __tm6000_ir_int_start;
                rc->close   = __tm6000_ir_int_stop;
                INIT_DELAYED_WORK(&ir->work, tm6000_ir_int_work);
index 7ce967bf01ec67036526b1c01e3023dcb1b059c5..bc13db736e2457e7d89575b8b7c656f3e05a8ce7 100644 (file)
@@ -1612,7 +1612,7 @@ static int tm6000_release(struct file *file)
 
                usb_reset_configuration(dev->udev);
 
-               if (&dev->int_in)
+               if (dev->int_in.endp)
                        usb_set_interface(dev->udev,
                                        dev->isoc_in.bInterfaceNumber, 2);
                else