From: Thierry Reding Date: Tue, 6 Dec 2011 12:39:35 +0000 (-0300) Subject: [media] tm6000: Fix check for interrupt endpoint X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4be9c8fb58e48cd0110bd9504b0af1e18fa54467;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] tm6000: Fix check for interrupt endpoint 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/video/tm6000/tm6000-input.c index af4bcf5288a9..89e003c0cfed 100644 --- a/drivers/media/video/tm6000/tm6000-input.c +++ b/drivers/media/video/tm6000/tm6000-input.c @@ -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); diff --git a/drivers/media/video/tm6000/tm6000-video.c b/drivers/media/video/tm6000/tm6000-video.c index 7ce967bf01ec..bc13db736e24 100644 --- a/drivers/media/video/tm6000/tm6000-video.c +++ b/drivers/media/video/tm6000/tm6000-video.c @@ -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