diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2002-04-09 15:14:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 13:37:11 -0500 |
commit | 43cb76d91ee85f579a69d42bc8efc08bac560278 (patch) | |
tree | f5c4766a6639fee3685dbbfc9110bb334af9e6dd /drivers/infiniband/ulp/ipoib/ipoib_vlan.c | |
parent | 2943ecf2ed32632473c06f1975db47a7aa98c10f (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.c | 11 |
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 | ||
45 | static ssize_t show_parent(struct class_device *class_dev, char *buf) | 45 | static 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 | } |
53 | static CLASS_DEVICE_ATTR(parent, S_IRUGO, show_parent, NULL); | 53 | static DEVICE_ATTR(parent, S_IRUGO, show_parent, NULL); |
54 | 54 | ||
55 | int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey) | 55 | int 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); |