V4L/DVB (10171): Use usb_set_intfdata
authorJulia Lawall <julia@diku.dk>
Thu, 1 Jan 2009 20:14:58 +0000 (17:14 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 3 Jan 2009 12:50:26 +0000 (10:50 -0200)
commit03fb02c604d68156c0828e3950094f18ce529385
tree9633952ee6981d39890d91c0580d8f619a57ddbf
parent6b55009e1dc7c2a66c8f5fad67045f0536c9bbd8
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>
drivers/media/video/zr364xx.c