drivers/net: use dev_get_drvdata
authorJulia Lawall <julia@diku.dk>
Sun, 17 May 2009 09:28:42 +0000 (11:28 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 20 May 2009 18:46:27 +0000 (14:46 -0400)
commit4eaf16bc1f92bf772f6d42860e86b399d00b7b94
treed5abea5d11045b52954e8f1d4992eca9994be3ec
parentcf5aa2f1f39d367d449df4c10de3d8e6f9c4443b
drivers/net: use dev_get_drvdata

Eliminate direct accesses to the driver_data field.
cf 82ab13b26f15f49be45f15ccc96bfa0b81dfd015

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
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)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c