diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-08 20:04:36 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:06:19 -0800 |
commit | aa21c004f80bdf943736c62dccf0c0398d7824f3 (patch) | |
tree | 6815328775d3b5ec46bb342c4c256cde0f223863 /drivers/net/wireless/libertas/ethtool.c | |
parent | f86a93e1b2d05a7a38a48c91f8fb8fc7e8f1c734 (diff) | |
download | op-kernel-dev-aa21c004f80bdf943736c62dccf0c0398d7824f3.zip op-kernel-dev-aa21c004f80bdf943736c62dccf0c0398d7824f3.tar.gz |
libertas: kill struct lbs_adapter
There seems to be no reason for a separate structure; move it all
into struct lbs_private.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/ethtool.c')
-rw-r--r-- | drivers/net/wireless/libertas/ethtool.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index f32fb00..a54b4f4 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c @@ -25,7 +25,7 @@ static void lbs_ethtool_get_drvinfo(struct net_device *dev, struct lbs_private *priv = (struct lbs_private *) dev->priv; char fwver[32]; - lbs_get_fwversion(priv->adapter, fwver, sizeof(fwver) - 1); + lbs_get_fwversion(priv, fwver, sizeof(fwver) - 1); strcpy(info->driver, "libertas"); strcpy(info->version, lbs_driver_version); @@ -46,7 +46,6 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * bytes) { struct lbs_private *priv = (struct lbs_private *) dev->priv; - struct lbs_adapter *adapter = priv->adapter; struct lbs_ioctl_regrdwr regctrl; char *ptr; int ret; @@ -60,10 +59,10 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, // mutex_lock(&priv->mutex); - adapter->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL); - if (!adapter->prdeeprom) + priv->prdeeprom = kmalloc(eeprom->len+sizeof(regctrl), GFP_KERNEL); + if (!priv->prdeeprom) return -ENOMEM; - memcpy(adapter->prdeeprom, ®ctrl, sizeof(regctrl)); + memcpy(priv->prdeeprom, ®ctrl, sizeof(regctrl)); /* +14 is for action, offset, and NOB in * response */ @@ -77,14 +76,14 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, ®ctrl); if (ret) { - if (adapter->prdeeprom) - kfree(adapter->prdeeprom); + if (priv->prdeeprom) + kfree(priv->prdeeprom); goto done; } mdelay(10); - ptr = (char *)adapter->prdeeprom; + ptr = (char *)priv->prdeeprom; /* skip the command header, but include the "value" u32 variable */ ptr = ptr + sizeof(struct lbs_ioctl_regrdwr) - 4; @@ -94,8 +93,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev, */ memcpy(bytes, ptr, eeprom->len); - if (adapter->prdeeprom) - kfree(adapter->prdeeprom); + if (priv->prdeeprom) + kfree(priv->prdeeprom); // mutex_unlock(&priv->mutex); ret = 0; |