diff options
author | Julia Lawall <julia@diku.dk> | 2009-05-17 05:28:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-20 14:46:27 -0400 |
commit | 4eaf16bc1f92bf772f6d42860e86b399d00b7b94 (patch) | |
tree | d5abea5d11045b52954e8f1d4992eca9994be3ec | |
parent | cf5aa2f1f39d367d449df4c10de3d8e6f9c4443b (diff) |
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>
-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, | |||
2478 | static ssize_t show_qos(struct device *d, | 2478 | static ssize_t show_qos(struct device *d, |
2479 | struct device_attribute *attr, char *buf) | 2479 | struct device_attribute *attr, char *buf) |
2480 | { | 2480 | { |
2481 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | 2481 | struct iwl_priv *priv = dev_get_drvdata(d); |
2482 | char *p = buf; | 2482 | char *p = buf; |
2483 | int q; | 2483 | int q; |
2484 | 2484 | ||