From: Stephen Hemminger <shemminger@osdl.org>
To: Zwane Mwaikambo <zwane@fsmlabs.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH][2.6] fix bridge sysfs improperly initialised knobject
Date: Thu, 17 Jun 2004 14:45:22 -0700 [thread overview]
Message-ID: <20040617144522.04ae5de7@dell_ss3.pdx.osdl.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0406161247140.1944@montezuma.fsmlabs.com>
The whole effort to avoid hotplug was misguided. If it is really a problem
(which it doesn't appear to be) then it can more easily be addressed by smarter
hotplug scripts in user space.
This patch gets rid of the whole subsystem hack for bridge kobjects.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff -Nru a/net/bridge/br.c b/net/bridge/br.c
--- a/net/bridge/br.c 2004-06-17 14:14:16 -07:00
+++ b/net/bridge/br.c 2004-06-17 14:14:16 -07:00
@@ -33,8 +33,6 @@
{
br_fdb_init();
- br_sysfs_init();
-
#ifdef CONFIG_BRIDGE_NETFILTER
if (br_netfilter_init())
return 1;
@@ -69,7 +67,6 @@
#endif
br_handle_frame_hook = NULL;
- br_sysfs_fini();
br_fdb_fini();
}
diff -Nru a/net/bridge/br_private.h b/net/bridge/br_private.h
--- a/net/bridge/br_private.h 2004-06-17 14:14:16 -07:00
+++ b/net/bridge/br_private.h 2004-06-17 14:14:16 -07:00
@@ -217,9 +217,6 @@
extern void br_sysfs_freeif(struct net_bridge_port *p);
/* br_sysfs_br.c */
-extern struct subsystem bridge_subsys;
-extern void br_sysfs_init(void);
-extern void br_sysfs_fini(void);
extern int br_sysfs_addbr(struct net_device *dev);
extern void br_sysfs_delbr(struct net_device *dev);
@@ -228,8 +225,6 @@
#define br_sysfs_addif(p) (0)
#define br_sysfs_removeif(p) do { } while(0)
#define br_sysfs_freeif(p) kfree(p)
-#define br_sysfs_init() do { } while(0)
-#define br_sysfs_fini() do { } while(0)
#define br_sysfs_addbr(dev) (0)
#define br_sysfs_delbr(dev) do { } while(0)
#endif /* CONFIG_SYSFS */
diff -Nru a/net/bridge/br_sysfs_br.c b/net/bridge/br_sysfs_br.c
--- a/net/bridge/br_sysfs_br.c 2004-06-17 14:14:16 -07:00
+++ b/net/bridge/br_sysfs_br.c 2004-06-17 14:14:16 -07:00
@@ -300,25 +300,6 @@
.read = brforward_read,
};
-
-/*
- * This is a dummy kset so bridge objects don't cause
- * hotplug events
- */
-struct subsystem bridge_subsys = {
- .kset = { .hotplug_ops = NULL },
-};
-
-void br_sysfs_init(void)
-{
- subsystem_register(&bridge_subsys);
-}
-
-void br_sysfs_fini(void)
-{
- subsystem_unregister(&bridge_subsys);
-}
-
/*
* Add entries in sysfs onto the existing network class device
* for the bridge.
@@ -353,7 +334,7 @@
kobject_set_name(&br->ifobj, SYSFS_BRIDGE_PORT_SUBDIR);
br->ifobj.ktype = NULL;
- br->ifobj.kset = &bridge_subsys.kset;
+ br->ifobj.kset = NULL;
br->ifobj.parent = brobj;
err = kobject_register(&br->ifobj);
diff -Nru a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
--- a/net/bridge/br_sysfs_if.c 2004-06-17 14:14:16 -07:00
+++ b/net/bridge/br_sysfs_if.c 2004-06-17 14:14:16 -07:00
@@ -227,7 +227,7 @@
kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
p->kobj.ktype = &brport_ktype;
p->kobj.parent = &(p->dev->class_dev.kobj);
- p->kobj.kset = &bridge_subsys.kset;
+ p->kobj.kset = NULL;
err = kobject_add(&p->kobj);
if(err)
next prev parent reply other threads:[~2004-06-17 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-16 23:48 Zwane Mwaikambo
2004-06-17 20:46 ` Stephen Hemminger
2004-06-17 20:51 ` David S. Miller
2004-06-17 20:58 ` Greg KH
2004-06-17 21:45 ` Stephen Hemminger [this message]
2004-06-18 20:19 ` 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=20040617144522.04ae5de7@dell_ss3.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zwane@fsmlabs.com \
/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
all inboxes | Powered by JetHome®