Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (35 sloc) 645 Bytes
//
// Use dev_set_drvdata
//
// Target: Linux
// Copyright: 2012 - LIP6/INRIA
// License: Licensed under ISC. See LICENSE or http://www.isc.org/software/license
// Author: Julia Lawall <Julia.Lawall@lip6.fr>
// URL: http://coccinelle.lip6.fr/
// URL: http://coccinellery.org/
@@
struct device dev;
expression E;
type T;
@@
- dev.driver_data = (T)E
+ dev_set_drvdata(&dev, E)
@@
struct device *dev;
expression E;
type T;
@@
- dev->driver_data = (T)E
+ dev_set_drvdata(dev, E)
@@
struct device dev;
type T;
@@
- (T)dev.driver_data
+ dev_get_drvdata(&dev)
@@
struct device *dev;
type T;
@@
- (T)dev->driver_data
+ dev_get_drvdata(dev)