summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/prism54
diff options
context:
space:
mode:
authorYoann Padioleau <padator@wanadoo.fr>2007-08-03 21:37:16 +0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 03:49:37 +0400
commit6dbc9c89fb242873bd3e83890e59da3d6e462025 (patch)
tree9e70567b27c3245b3bcd641cb63a29f8f648719a /drivers/net/wireless/prism54
parent8951554dba0c7962ae72faece66e8f5085a777d6 (diff)
downloadlinux-6dbc9c89fb242873bd3e83890e59da3d6e462025.tar.xz
[PATCH] dev->priv to netdev_priv(dev), for drivers/net/wireless
Replacing accesses to dev->priv to netdev_priv(dev). The replacment is safe when netdev_priv is used to access a private structure that is right next to the net_device structure in memory. Cf http://groups.google.com/group/comp.os.linux.development.system/browse_thread/thread/de19321bcd94dbb8/0d74a4adcd6177bd This is the case when the net_device structure was allocated with a call to alloc_netdev or one of its derivative. Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: mcgrof@gmail.com Cc: linux-wireless@vger.kernel.org Cc: akpm@linux-foundation.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/prism54')
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 585f5996d292..f1066614dc31 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -1753,7 +1753,7 @@ prism54_get_oid(struct net_device *ndev, struct iw_request_info *info,
int rvalue;
enum oid_num_t n = dwrq->flags;
- rvalue = mgt_get_request((islpci_private *) ndev->priv, n, 0, NULL, &r);
+ rvalue = mgt_get_request(netdev_priv(ndev), n, 0, NULL, &r);
dwrq->length = mgt_response_to_str(n, &r, extra);
if ((isl_oid[n].flags & OID_FLAG_TYPE) != OID_TYPE_U32)
kfree(r.ptr);
@@ -1766,7 +1766,7 @@ prism54_set_u32(struct net_device *ndev, struct iw_request_info *info,
{
u32 oid = uwrq[0], u = uwrq[1];
- return mgt_set_request((islpci_private *) ndev->priv, oid, 0, &u);
+ return mgt_set_request(netdev_priv(ndev), oid, 0, &u);
}
static int
@@ -1775,7 +1775,7 @@ prism54_set_raw(struct net_device *ndev, struct iw_request_info *info,
{
u32 oid = dwrq->flags;
- return mgt_set_request((islpci_private *) ndev->priv, oid, 0, extra);
+ return mgt_set_request(netdev_priv(ndev), oid, 0, extra);
}
void