mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
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>
This commit is contained in:
parent
f2b305cd67
commit
aeb506aaaa
@ -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);
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user