提交 4be9c8fb 编写于 作者: T Thierry Reding 提交者: Mauro Carvalho Chehab

[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: NThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 875f0e3d
......@@ -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);
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册