aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-11-24 18:34:00 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-24 18:34:00 -0500
commit4b40eed73e3787d60160beed1352ceadd24f6be1 (patch)
treeb85c3f6b4a159cee164c9cec7ac12be849d8e568 /drivers/infiniband
parent486bf8de17361232c40e092a219f328093e34dca (diff)
infiniband: Kill directly reference of netdev->priv
This use of netdev->priv is wrong. The right way is: alloc_netdev() with no memory for private data. make netdev->ml_priv to point to c2_dev. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/amso1100/c2_provider.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c
index 69580e282af0..5119d6508181 100644
--- a/drivers/infiniband/hw/amso1100/c2_provider.c
+++ b/drivers/infiniband/hw/amso1100/c2_provider.c
@@ -653,7 +653,7 @@ static int c2_service_destroy(struct iw_cm_id *cm_id)
653static int c2_pseudo_up(struct net_device *netdev) 653static int c2_pseudo_up(struct net_device *netdev)
654{ 654{
655 struct in_device *ind; 655 struct in_device *ind;
656 struct c2_dev *c2dev = netdev->priv; 656 struct c2_dev *c2dev = netdev->ml_priv;
657 657
658 ind = in_dev_get(netdev); 658 ind = in_dev_get(netdev);
659 if (!ind) 659 if (!ind)
@@ -678,7 +678,7 @@ static int c2_pseudo_up(struct net_device *netdev)
678static int c2_pseudo_down(struct net_device *netdev) 678static int c2_pseudo_down(struct net_device *netdev)
679{ 679{
680 struct in_device *ind; 680 struct in_device *ind;
681 struct c2_dev *c2dev = netdev->priv; 681 struct c2_dev *c2dev = netdev->ml_priv;
682 682
683 ind = in_dev_get(netdev); 683 ind = in_dev_get(netdev);
684 if (!ind) 684 if (!ind)
@@ -746,14 +746,14 @@ static struct net_device *c2_pseudo_netdev_init(struct c2_dev *c2dev)
746 /* change ethxxx to iwxxx */ 746 /* change ethxxx to iwxxx */
747 strcpy(name, "iw"); 747 strcpy(name, "iw");
748 strcat(name, &c2dev->netdev->name[3]); 748 strcat(name, &c2dev->netdev->name[3]);
749 netdev = alloc_netdev(sizeof(*netdev), name, setup); 749 netdev = alloc_netdev(0, name, setup);
750 if (!netdev) { 750 if (!netdev) {
751 printk(KERN_ERR PFX "%s - etherdev alloc failed", 751 printk(KERN_ERR PFX "%s - etherdev alloc failed",
752 __func__); 752 __func__);
753 return NULL; 753 return NULL;
754 } 754 }
755 755
756 netdev->priv = c2dev; 756 netdev->ml_priv = c2dev;
757 757
758 SET_NETDEV_DEV(netdev, &c2dev->pcidev->dev); 758 SET_NETDEV_DEV(netdev, &c2dev->pcidev->dev);
759 759