diff options
author | Julia Lawall <julia@diku.dk> | 2009-05-17 13:28:42 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-20 22:46:27 +0400 |
commit | 4eaf16bc1f92bf772f6d42860e86b399d00b7b94 (patch) | |
tree | d5abea5d11045b52954e8f1d4992eca9994be3ec /drivers/net/wireless/iwlwifi | |
parent | cf5aa2f1f39d367d449df4c10de3d8e6f9c4443b (diff) | |
download | linux-4eaf16bc1f92bf772f6d42860e86b399d00b7b94.tar.xz |
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 596977d71c94..eb89752aff73 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c @@ -2478,7 +2478,7 @@ static DEVICE_ATTR(power_level, S_IWUSR | S_IRUSR, show_power_level, static ssize_t show_qos(struct device *d, struct device_attribute *attr, char *buf) { - struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; + struct iwl_priv *priv = dev_get_drvdata(d); char *p = buf; int q; |