]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/iseries_veth.c
Pull sony into release branch
[linux-2.6-omap-h63xx.git] / drivers / net / iseries_veth.c
index 2194b567239fcf502ebc7c42ee64f476e18a00be..0433c41f9029b8c06cce63e7e0842756f06d8147 100644 (file)
@@ -822,10 +822,9 @@ static int veth_init_connection(u8 rlp)
             || ! HvLpConfig_doLpsCommunicateOnVirtualLan(this_lp, rlp) )
                return 0;
 
-       cnx = kmalloc(sizeof(*cnx), GFP_KERNEL);
+       cnx = kzalloc(sizeof(*cnx), GFP_KERNEL);
        if (! cnx)
                return -ENOMEM;
-       memset(cnx, 0, sizeof(*cnx));
 
        cnx->remote_lp = rlp;
        spin_lock_init(&cnx->lock);
@@ -852,14 +851,13 @@ static int veth_init_connection(u8 rlp)
        if (rc != 0)
                return rc;
 
-       msgs = kmalloc(VETH_NUMBUFFERS * sizeof(struct veth_msg), GFP_KERNEL);
+       msgs = kcalloc(VETH_NUMBUFFERS, sizeof(struct veth_msg), GFP_KERNEL);
        if (! msgs) {
                veth_error("Can't allocate buffers for LPAR %d.\n", rlp);
                return -ENOMEM;
        }
 
        cnx->msgs = msgs;
-       memset(msgs, 0, VETH_NUMBUFFERS * sizeof(struct veth_msg));
 
        for (i = 0; i < VETH_NUMBUFFERS; i++) {
                msgs[i].token = i;
@@ -1102,7 +1100,7 @@ static struct net_device * __init veth_probe_one(int vlan,
        }
 
        kobject_init(&port->kobject);
-       port->kobject.parent = &dev->class_dev.kobj;
+       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))
@@ -1540,7 +1538,6 @@ static void veth_receive(struct veth_lpar_connection *cnx,
                }
 
                skb_put(skb, length);
-               skb->dev = dev;
                skb->protocol = eth_type_trans(skb, dev);
                skb->ip_summed = CHECKSUM_NONE;
                netif_rx(skb);  /* send it up */