aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/arlan-proc.c
diff options
context:
space:
mode:
authorYoann Padioleau <padator@wanadoo.fr>2007-08-03 13:37:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:49:37 -0400
commit6dbc9c89fb242873bd3e83890e59da3d6e462025 (patch)
tree9e70567b27c3245b3bcd641cb63a29f8f648719a /drivers/net/wireless/arlan-proc.c
parent8951554dba0c7962ae72faece66e8f5085a777d6 (diff)
[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/arlan-proc.c')
-rw-r--r--drivers/net/wireless/arlan-proc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index 015abd928ab0..c6e70dbc5de8 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -435,7 +435,7 @@ static int arlan_sysctl_info(ctl_table * ctl, int write, struct file *filp,
435 goto final; 435 goto final;
436 } 436 }
437 else 437 else
438 priva = arlan_device[devnum]->priv; 438 priva = netdev_priv(arlan_device[devnum]);
439 439
440 if (priva == NULL) 440 if (priva == NULL)
441 { 441 {
@@ -654,7 +654,7 @@ static int arlan_sysctl_info161719(ctl_table * ctl, int write, struct file *filp
654 goto final; 654 goto final;
655 } 655 }
656 else 656 else
657 priva = arlan_device[devnum]->priv; 657 priva = netdev_priv(arlan_device[devnum]);
658 if (priva == NULL) 658 if (priva == NULL)
659 { 659 {
660 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 660 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -688,7 +688,7 @@ static int arlan_sysctl_infotxRing(ctl_table * ctl, int write, struct file *filp
688 goto final; 688 goto final;
689 } 689 }
690 else 690 else
691 priva = arlan_device[devnum]->priv; 691 priva = netdev_priv(arlan_device[devnum]);
692 if (priva == NULL) 692 if (priva == NULL)
693 { 693 {
694 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 694 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -716,7 +716,7 @@ static int arlan_sysctl_inforxRing(ctl_table * ctl, int write, struct file *filp
716 pos += sprintf(arlan_drive_info + pos, "No device found here \n"); 716 pos += sprintf(arlan_drive_info + pos, "No device found here \n");
717 goto final; 717 goto final;
718 } else 718 } else
719 priva = arlan_device[devnum]->priv; 719 priva = netdev_priv(arlan_device[devnum]);
720 if (priva == NULL) 720 if (priva == NULL)
721 { 721 {
722 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 722 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -745,7 +745,7 @@ static int arlan_sysctl_info18(ctl_table * ctl, int write, struct file *filp,
745 goto final; 745 goto final;
746 } 746 }
747 else 747 else
748 priva = arlan_device[devnum]->priv; 748 priva = netdev_priv(arlan_device[devnum]);
749 if (priva == NULL) 749 if (priva == NULL)
750 { 750 {
751 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n "); 751 printk(KERN_WARNING " Could not find the device private in arlan procsys, bad\n ");
@@ -780,7 +780,7 @@ static int arlan_configure(ctl_table * ctl, int write, struct file *filp,
780 } 780 }
781 else if (arlan_device[devnum] != NULL) 781 else if (arlan_device[devnum] != NULL)
782 { 782 {
783 priv = arlan_device[devnum]->priv; 783 priv = netdev_priv(arlan_device[devnum]);
784 784
785 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_CONF); 785 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_CONF);
786 } 786 }
@@ -805,7 +805,7 @@ static int arlan_sysctl_reset(ctl_table * ctl, int write, struct file *filp,
805 } 805 }
806 else if (arlan_device[devnum] != NULL) 806 else if (arlan_device[devnum] != NULL)
807 { 807 {
808 priv = arlan_device[devnum]->priv; 808 priv = netdev_priv(arlan_device[devnum]);
809 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_RESET); 809 arlan_command(arlan_device[devnum], ARLAN_COMMAND_CLEAN_AND_RESET);
810 810
811 } else 811 } else