Commit aeb506aa authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

V4L/DVB: usbvision: don't use usb_set_intfdata, let v4l2_device_register handle this

v4l2_device_register already sets intfdata, no need to do this again.
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f2b305cd
...@@ -1649,8 +1649,6 @@ static int __devinit usbvision_probe(struct usb_interface *intf, ...@@ -1649,8 +1649,6 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
usbvision_configure_video(usbvision); usbvision_configure_video(usbvision);
mutex_unlock(&usbvision->lock); mutex_unlock(&usbvision->lock);
usb_set_intfdata (intf, usbvision);
usbvision_create_sysfs(usbvision->vdev); usbvision_create_sysfs(usbvision->vdev);
PDEBUG(DBG_PROBE, "success"); PDEBUG(DBG_PROBE, "success");
...@@ -1668,7 +1666,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf, ...@@ -1668,7 +1666,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
*/ */
static void __devexit usbvision_disconnect(struct usb_interface *intf) static void __devexit usbvision_disconnect(struct usb_interface *intf)
{ {
struct usb_usbvision *usbvision = usb_get_intfdata(intf); struct usb_usbvision *usbvision = to_usbvision(usb_get_intfdata(intf));
PDEBUG(DBG_PROBE, ""); PDEBUG(DBG_PROBE, "");
...@@ -1677,7 +1675,6 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) ...@@ -1677,7 +1675,6 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf)
"%s: usb_get_intfdata() failed\n", __func__); "%s: usb_get_intfdata() failed\n", __func__);
return; return;
} }
usb_set_intfdata (intf, NULL);
mutex_lock(&usbvision->lock); mutex_lock(&usbvision->lock);
......
...@@ -462,6 +462,11 @@ struct usb_usbvision { ...@@ -462,6 +462,11 @@ struct usb_usbvision {
int ComprBlockTypes[4]; int ComprBlockTypes[4];
}; };
static inline struct usb_usbvision *to_usbvision(struct v4l2_device *v4l2_dev)
{
return container_of(v4l2_dev, struct usb_usbvision, v4l2_dev);
}
#define call_all(usbvision, o, f, args...) \ #define call_all(usbvision, o, f, args...) \
v4l2_device_call_all(&usbvision->v4l2_dev, 0, o, f, ##args) v4l2_device_call_all(&usbvision->v4l2_dev, 0, o, f, ##args)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment