Commit 171faae1 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Linus Torvalds

[BRIDGE]: Kill sysfs hotplug avoidance hacks.

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: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 08b34e1c
......@@ -33,8 +33,6 @@ static int __init br_init(void)
{
br_fdb_init();
br_sysfs_init();
#ifdef CONFIG_BRIDGE_NETFILTER
if (br_netfilter_init())
return 1;
......@@ -69,7 +67,6 @@ static void __exit br_deinit(void)
#endif
br_handle_frame_hook = NULL;
br_sysfs_fini();
br_fdb_fini();
}
......
......@@ -217,9 +217,6 @@ extern void br_sysfs_removeif(struct net_bridge_port *p);
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 @@ extern void br_sysfs_delbr(struct net_device *dev);
#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 */
......
......@@ -300,23 +300,6 @@ static struct bin_attribute bridge_forward = {
.read = brforward_read,
};
/*
* This is a dummy kset so bridge objects don't cause
* hotplug events
*/
decl_subsys_name(bridge, net_bridge, NULL, 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.
......@@ -351,7 +334,7 @@ int br_sysfs_addbr(struct net_device *dev)
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);
......
......@@ -227,7 +227,7 @@ int br_sysfs_addif(struct net_bridge_port *p)
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)
......
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