aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2x00/ipw2100.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-01 02:02:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-06 15:15:01 -0400
commit928841b1538df117658ec5977bcf336c27f7747b (patch)
treeea2b5ac0353b5bbdab4c10402403a0da5a108bd4 /drivers/net/wireless/ipw2x00/ipw2100.c
parent8bce6121706dd82c266c3f527e592abfb3e164d1 (diff)
Wireless: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: John W. Linville <linville@tuxdriver.com> Cc: linux-wireless@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2x00/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 97e5647ff050..742432388ca3 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -3488,7 +3488,7 @@ static DEVICE_ATTR(pci, S_IRUGO, show_pci, NULL);
3488static ssize_t show_cfg(struct device *d, struct device_attribute *attr, 3488static ssize_t show_cfg(struct device *d, struct device_attribute *attr,
3489 char *buf) 3489 char *buf)
3490{ 3490{
3491 struct ipw2100_priv *p = d->driver_data; 3491 struct ipw2100_priv *p = dev_get_drvdata(d);
3492 return sprintf(buf, "0x%08x\n", (int)p->config); 3492 return sprintf(buf, "0x%08x\n", (int)p->config);
3493} 3493}
3494 3494
@@ -3497,7 +3497,7 @@ static DEVICE_ATTR(cfg, S_IRUGO, show_cfg, NULL);
3497static ssize_t show_status(struct device *d, struct device_attribute *attr, 3497static ssize_t show_status(struct device *d, struct device_attribute *attr,
3498 char *buf) 3498 char *buf)
3499{ 3499{
3500 struct ipw2100_priv *p = d->driver_data; 3500 struct ipw2100_priv *p = dev_get_drvdata(d);
3501 return sprintf(buf, "0x%08x\n", (int)p->status); 3501 return sprintf(buf, "0x%08x\n", (int)p->status);
3502} 3502}
3503 3503
@@ -3506,7 +3506,7 @@ static DEVICE_ATTR(status, S_IRUGO, show_status, NULL);
3506static ssize_t show_capability(struct device *d, struct device_attribute *attr, 3506static ssize_t show_capability(struct device *d, struct device_attribute *attr,
3507 char *buf) 3507 char *buf)
3508{ 3508{
3509 struct ipw2100_priv *p = d->driver_data; 3509 struct ipw2100_priv *p = dev_get_drvdata(d);
3510 return sprintf(buf, "0x%08x\n", (int)p->capability); 3510 return sprintf(buf, "0x%08x\n", (int)p->capability);
3511} 3511}
3512 3512
@@ -4224,7 +4224,7 @@ static ssize_t show_rf_kill(struct device *d, struct device_attribute *attr,
4224 1 - SW based RF kill active (sysfs) 4224 1 - SW based RF kill active (sysfs)
4225 2 - HW based RF kill active 4225 2 - HW based RF kill active
4226 3 - Both HW and SW baed RF kill active */ 4226 3 - Both HW and SW baed RF kill active */
4227 struct ipw2100_priv *priv = (struct ipw2100_priv *)d->driver_data; 4227 struct ipw2100_priv *priv = dev_get_drvdata(d);
4228 int val = ((priv->status & STATUS_RF_KILL_SW) ? 0x1 : 0x0) | 4228 int val = ((priv->status & STATUS_RF_KILL_SW) ? 0x1 : 0x0) |
4229 (rf_kill_active(priv) ? 0x2 : 0x0); 4229 (rf_kill_active(priv) ? 0x2 : 0x0);
4230 return sprintf(buf, "%i\n", val); 4230 return sprintf(buf, "%i\n", val);