[PATCH 1/2] [media] tm6000: Fix check for interrupt endpoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
---
 drivers/media/video/tm6000/tm6000-input.c |    2 +-
 drivers/media/video/tm6000/tm6000-video.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/tm6000/tm6000-input.c b/drivers/media/video/tm6000/tm6000-input.c
index af4bcf5..89e003c 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 e147d92..87eb909 100644
--- a/drivers/media/video/tm6000/tm6000-video.c
+++ b/drivers/media/video/tm6000/tm6000-video.c
@@ -1647,7 +1647,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);
-- 
1.7.8

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux