From: Jeff Muizelaar <muizelaar@rogers.com>
To: shemminger@osdl.org
Cc: netdev@oss.sgi.com
Subject: [PATCH] post-sysfs netdev cleanup
Date: Thu, 22 May 2003 20:41:17 -0400 [thread overview]
Message-ID: <3ECD6E2D.5090000@rogers.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
The attached patch removes the struct device from struct net_device and
sets net_device.class_dev.dev directly.
The class_dev memset is removed because all of struct net_device should
already be memset to 0 or there will be other problems.
-Jeff
[-- Attachment #2: netdev-cleanup.patch --]
[-- Type: text/plain, Size: 1408 bytes --]
diff -urN linux-2.5.69-bk15/include/linux/netdevice.h linux-2.5.69-bk15-netdev-cleanup/include/linux/netdevice.h
--- linux-2.5.69-bk15/include/linux/netdevice.h 2003-05-22 20:14:06.000000000 -0400
+++ linux-2.5.69-bk15-netdev-cleanup/include/linux/netdevice.h 2003-05-22 20:15:56.000000000 -0400
@@ -441,9 +441,6 @@
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 @@
/* 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
diff -urN linux-2.5.69-bk15/net/core/net-sysfs.c linux-2.5.69-bk15-netdev-cleanup/net/core/net-sysfs.c
--- linux-2.5.69-bk15/net/core/net-sysfs.c 2003-05-22 20:14:08.000000000 -0400
+++ linux-2.5.69-bk15-netdev-cleanup/net/core/net-sysfs.c 2003-05-22 20:15:56.000000000 -0400
@@ -291,9 +291,7 @@
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);
next reply other threads:[~2003-05-23 0:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-23 0:41 Jeff Muizelaar [this message]
2003-05-23 0:44 ` [PATCH] post-sysfs netdev cleanup David S. Miller
[not found] ` <3ECEB317.5020407@osdl.org>
2003-05-26 2:24 ` David S. Miller
2003-05-27 16:51 ` Stephen Hemminger
2003-05-28 8:33 ` David S. Miller
2003-05-26 2:22 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ECD6E2D.5090000@rogers.com \
--to=muizelaar@rogers.com \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).