Commit a8f8aaee authored by Jeff Muizelaar's avatar Jeff Muizelaar Committed by David S. Miller

[NET]: post-sysfs netdev cleanup.

parent 4a14ac72
...@@ -441,9 +441,6 @@ struct net_device ...@@ -441,9 +441,6 @@ struct net_device
struct divert_blk *divert; struct divert_blk *divert;
#endif /* CONFIG_NET_DIVERT */ #endif /* CONFIG_NET_DIVERT */
/* generic device structure used in constructing class */
struct device *dev;
/* class/net/name entry */ /* class/net/name entry */
struct class_device class_dev; struct class_device class_dev;
...@@ -455,7 +452,7 @@ struct net_device ...@@ -455,7 +452,7 @@ struct net_device
/* Set the sysfs physical device reference for the network logical device /* Set the sysfs physical device reference for the network logical device
* if set prior to registration will cause a symlink during initialization. * if set prior to registration will cause a symlink during initialization.
*/ */
#define SET_NETDEV_DEV(net, pdev) ((net)->dev = (pdev)) #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev))
struct packet_type struct packet_type
......
...@@ -291,9 +291,7 @@ int netdev_register_sysfs(struct net_device *net) ...@@ -291,9 +291,7 @@ int netdev_register_sysfs(struct net_device *net)
struct class_device_attribute *attr; struct class_device_attribute *attr;
int ret; int ret;
memset(class_dev, 0, sizeof(struct class_device));
class_dev->class = &net_class; class_dev->class = &net_class;
class_dev->dev = net->dev;
class_dev->class_data = net; class_dev->class_data = net;
snprintf(class_dev->class_id, BUS_ID_SIZE, net->name); snprintf(class_dev->class_id, BUS_ID_SIZE, net->name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment