Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75819
b: refs/heads/master
c: 78be3d2
h: refs/heads/master
i:
  75817: c3ae86a
  75815: 728d317
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent ef36d42 commit ac0f72a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 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: 9990513c1ef040528c4e38163a073089d39c7903
refs/heads/master: 78be3d2f574bf8a9886550ad07b8124b194badb8
19 changes: 6 additions & 13 deletions trunk/drivers/net/iseries_veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ static int veth_init_connection(u8 rlp)
{
struct veth_lpar_connection *cnx;
struct veth_msg *msgs;
int i, rc;
int i;

if ( (rlp == this_lp)
|| ! HvLpConfig_doLpsCommunicateOnVirtualLan(this_lp, rlp) )
Expand Down Expand Up @@ -844,11 +844,7 @@ static int veth_init_connection(u8 rlp)

/* This gets us 1 reference, which is held on behalf of the driver
* infrastructure. It's released at module unload. */
kobject_init(&cnx->kobject);
cnx->kobject.ktype = &veth_lpar_connection_ktype;
rc = kobject_set_name(&cnx->kobject, "cnx%.2d", rlp);
if (rc != 0)
return rc;
kobject_init_ng(&cnx->kobject, &veth_lpar_connection_ktype);

msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
if (! msgs) {
Expand Down Expand Up @@ -1087,11 +1083,8 @@ static struct net_device * __init veth_probe_one(int vlan,
return NULL;
}

kobject_init(&port->kobject);
port->kobject.parent = &dev->dev.kobj;
port->kobject.ktype = &veth_port_ktype;
kobject_set_name(&port->kobject, "veth_port");
if (0 != kobject_add(&port->kobject))
kobject_init_ng(&port->kobject, &veth_port_ktype);
if (0 != kobject_add_ng(&port->kobject, &dev->dev.kobj, "veth_port"))
veth_error("Failed adding port for %s to sysfs.\n", dev->name);

veth_info("%s attached to iSeries vlan %d (LPAR map = 0x%.4X)\n",
Expand Down Expand Up @@ -1711,9 +1704,9 @@ static int __init veth_module_init(void)
continue;

kobj = &veth_cnx[i]->kobject;
kobj->parent = &veth_driver.driver.kobj;
/* If the add failes, complain but otherwise continue */
if (0 != kobject_add(kobj))
if (0 != kobject_add_ng(kobj, &veth_driver.driver.kobj,
"cnx%.2d", veth_cnx[i]->remote_lp))
veth_error("cnx %d: Failed adding to sysfs.\n", i);
}

Expand Down

0 comments on commit ac0f72a

Please sign in to comment.