Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75824
b: refs/heads/master
c: e32cc73
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent ee821f6 commit 2729b61
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1eada11c88251e0a30ce5690d2607bb4293b3564
refs/heads/master: e32cc7366d88eeba12d22272a73dd83fb570ccb0
10 changes: 3 additions & 7 deletions trunk/net/bridge/br_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,6 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br,
p->state = BR_STATE_DISABLED;
br_stp_port_timer_init(p);

kobject_init(&p->kobj);
kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR);
p->kobj.ktype = &brport_ktype;
p->kobj.parent = &(dev->dev.kobj);
p->kobj.kset = NULL;

return p;
}

Expand Down Expand Up @@ -379,7 +373,8 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
if (IS_ERR(p))
return PTR_ERR(p);

err = kobject_add(&p->kobj);
err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj),
SYSFS_BRIDGE_PORT_ATTR);
if (err)
goto err0;

Expand Down Expand Up @@ -416,6 +411,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
br_fdb_delete_by_port(br, p, 1);
err1:
kobject_del(&p->kobj);
return err;
err0:
kobject_put(&p->kobj);
return err;
Expand Down

0 comments on commit 2729b61

Please sign in to comment.