diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-05-02 16:00:13 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 19:58:57 +0400 |
commit | aeb506aaaa08bc1910650666463843a73c34b139 (patch) | |
tree | 6fd23c08887d229f59e0d52fd3edfccca461bfc3 | |
parent | f2b305cd6711b7b3ce30db93b50bc5d6312950c8 (diff) | |
download | linux-aeb506aaaa08bc1910650666463843a73c34b139.tar.xz |
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: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 5 | ||||
-rw-r--r-- | drivers/media/video/usbvision/usbvision.h | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index d91f01668074..6248a639ba2d 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c @@ -1649,8 +1649,6 @@ static int __devinit usbvision_probe(struct usb_interface *intf, usbvision_configure_video(usbvision); mutex_unlock(&usbvision->lock); - - usb_set_intfdata (intf, usbvision); usbvision_create_sysfs(usbvision->vdev); PDEBUG(DBG_PROBE, "success"); @@ -1668,7 +1666,7 @@ static int __devinit usbvision_probe(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, ""); @@ -1677,7 +1675,6 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) "%s: usb_get_intfdata() failed\n", __func__); return; } - usb_set_intfdata (intf, NULL); mutex_lock(&usbvision->lock); diff --git a/drivers/media/video/usbvision/usbvision.h b/drivers/media/video/usbvision/usbvision.h index 5ab936e252fe..d1b3cc0cd87f 100644 --- a/drivers/media/video/usbvision/usbvision.h +++ b/drivers/media/video/usbvision/usbvision.h @@ -462,6 +462,11 @@ struct usb_usbvision { 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...) \ v4l2_device_call_all(&usbvision->v4l2_dev, 0, o, f, ##args) |