diff options
author | Julia Lawall <julia@diku.dk> | 2009-01-01 15:14:58 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-01-03 07:50:26 -0500 |
commit | 03fb02c604d68156c0828e3950094f18ce529385 (patch) | |
tree | 9633952ee6981d39890d91c0580d8f619a57ddbf /drivers/media/video/zr364xx.c | |
parent | 6b55009e1dc7c2a66c8f5fad67045f0536c9bbd8 (diff) |
V4L/DVB (10171): Use usb_set_intfdata
This code had calls to both usb_set_intfdata and dev_set_drvdata, doing the
same thing.
The semantic patch that lead to finding this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@header@
@@
@same depends on header@
position p;
@@
usb_set_intfdata@p(...) { ... }
@depends on header@
position _p!=same.p;
identifier _f;
struct usb_interface *intf;
expression data;
@@
_f@_p(...) { <+...
- dev_set_drvdata(&intf->dev, data);
+ usb_set_intfdata(intf, data);
...+> }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/zr364xx.c')
-rw-r--r-- | drivers/media/video/zr364xx.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index bf68ed9c5eb..93023560f32 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c | |||
@@ -893,7 +893,6 @@ static void zr364xx_disconnect(struct usb_interface *intf) | |||
893 | { | 893 | { |
894 | struct zr364xx_camera *cam = usb_get_intfdata(intf); | 894 | struct zr364xx_camera *cam = usb_get_intfdata(intf); |
895 | usb_set_intfdata(intf, NULL); | 895 | usb_set_intfdata(intf, NULL); |
896 | dev_set_drvdata(&intf->dev, NULL); | ||
897 | dev_info(&intf->dev, DRIVER_DESC " webcam unplugged\n"); | 896 | dev_info(&intf->dev, DRIVER_DESC " webcam unplugged\n"); |
898 | if (cam->vdev) | 897 | if (cam->vdev) |
899 | video_unregister_device(cam->vdev); | 898 | video_unregister_device(cam->vdev); |