]> git.neil.brown.name Git - history.git/commitdiff
[NET]: post-sysfs netdev cleanup.
authorJeff Muizelaar <muizelaar@rogers.com>
Sun, 25 May 2003 12:22:47 +0000 (05:22 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 25 May 2003 12:22:47 +0000 (05:22 -0700)
include/linux/netdevice.h
net/core/net-sysfs.c

index 7106c2eaf67e0b84d4b2f281a933b2f3d0d9f632..e445c167c91903c53414a47febc6004de9cc471e 100644 (file)
@@ -441,9 +441,6 @@ struct net_device
        struct divert_blk       *divert;
 #endif /* CONFIG_NET_DIVERT */
 
-       /* generic device structure used in constructing class */
-       struct device           *dev;
-
        /* class/net/name entry */
        struct class_device     class_dev;
 
@@ -455,7 +452,7 @@ struct net_device
 /* Set the sysfs physical device reference for the network logical device
  * 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 
index e4f69ff53bf6179ebab273680f8a5ebe81251bc6..e0da193e98fbc7ec699f291ee23b6c2fa4b2f2b7 100644 (file)
@@ -291,9 +291,7 @@ int netdev_register_sysfs(struct net_device *net)
        struct class_device_attribute *attr;
        int ret;
 
-       memset(class_dev, 0, sizeof(struct class_device)); 
        class_dev->class = &net_class;
-       class_dev->dev = net->dev;
        class_dev->class_data = net;
 
        snprintf(class_dev->class_id, BUS_ID_SIZE, net->name);