From: Julia Lawall Date: Thu, 1 Jan 2009 20:14:58 +0000 (-0300) Subject: V4L/DVB (10171): Use usb_set_intfdata X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=03fb02c604d68156c0828e3950094f18ce529385;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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/) // @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); ...+> } // Signed-off-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index bf68ed9c5eb6..93023560f324 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) { struct zr364xx_camera *cam = usb_get_intfdata(intf); usb_set_intfdata(intf, NULL); - dev_set_drvdata(&intf->dev, NULL); dev_info(&intf->dev, DRIVER_DESC " webcam unplugged\n"); if (cam->vdev) video_unregister_device(cam->vdev);