aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2002-04-09 15:14:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 13:37:11 -0500
commit43cb76d91ee85f579a69d42bc8efc08bac560278 (patch)
treef5c4766a6639fee3685dbbfc9110bb334af9e6dd /drivers/infiniband/ulp/ipoib/ipoib_vlan.c
parent2943ecf2ed32632473c06f1975db47a7aa98c10f (diff)
Network: convert network devices to use struct device instead of class_device
This lets the network core have the ability to handle suspend/resume issues, if it wants to. Thanks to Frederik Deweerdt <frederik.deweerdt@gmail.com> for the arm driver fixes. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_vlan.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_vlan.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
index f887780e8093..085eafe6667c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
@@ -42,15 +42,15 @@
42 42
43#include "ipoib.h" 43#include "ipoib.h"
44 44
45static ssize_t show_parent(struct class_device *class_dev, char *buf) 45static ssize_t show_parent(struct device *d, struct device_attribute *attr,
46 char *buf)
46{ 47{
47 struct net_device *dev = 48 struct net_device *dev = to_net_dev(d);
48 container_of(class_dev, struct net_device, class_dev);
49 struct ipoib_dev_priv *priv = netdev_priv(dev); 49 struct ipoib_dev_priv *priv = netdev_priv(dev);
50 50
51 return sprintf(buf, "%s\n", priv->parent->name); 51 return sprintf(buf, "%s\n", priv->parent->name);
52} 52}
53static CLASS_DEVICE_ATTR(parent, S_IRUGO, show_parent, NULL); 53static DEVICE_ATTR(parent, S_IRUGO, show_parent, NULL);
54 54
55int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey) 55int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
56{ 56{
@@ -118,8 +118,7 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
118 if (ipoib_add_pkey_attr(priv->dev)) 118 if (ipoib_add_pkey_attr(priv->dev))
119 goto sysfs_failed; 119 goto sysfs_failed;
120 120
121 if (class_device_create_file(&priv->dev->class_dev, 121 if (device_create_file(&priv->dev->dev, &dev_attr_parent))
122 &class_device_attr_parent))
123 goto sysfs_failed; 122 goto sysfs_failed;
124 123
125 list_add_tail(&priv->list, &ppriv->child_intfs); 124 list_add_tail(&priv->list, &ppriv->child_intfs);