diff options
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r-- | drivers/net/ibmveth.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 7d7758f3ad8c..57772bebff56 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c | |||
@@ -1179,13 +1179,15 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_ | |||
1179 | 1179 | ||
1180 | for(i = 0; i<IbmVethNumBufferPools; i++) { | 1180 | for(i = 0; i<IbmVethNumBufferPools; i++) { |
1181 | struct kobject *kobj = &adapter->rx_buff_pool[i].kobj; | 1181 | struct kobject *kobj = &adapter->rx_buff_pool[i].kobj; |
1182 | int error; | ||
1183 | |||
1182 | ibmveth_init_buffer_pool(&adapter->rx_buff_pool[i], i, | 1184 | ibmveth_init_buffer_pool(&adapter->rx_buff_pool[i], i, |
1183 | pool_count[i], pool_size[i], | 1185 | pool_count[i], pool_size[i], |
1184 | pool_active[i]); | 1186 | pool_active[i]); |
1185 | kobj->parent = &dev->dev.kobj; | 1187 | error = kobject_init_and_add(kobj, &ktype_veth_pool, |
1186 | kobject_set_name(kobj, "pool%d", i); | 1188 | &dev->dev.kobj, "pool%d", i); |
1187 | kobj->ktype = &ktype_veth_pool; | 1189 | if (!error) |
1188 | kobject_register(kobj); | 1190 | kobject_uevent(kobj, KOBJ_ADD); |
1189 | } | 1191 | } |
1190 | 1192 | ||
1191 | ibmveth_debug_printk("adapter @ 0x%p\n", adapter); | 1193 | ibmveth_debug_printk("adapter @ 0x%p\n", adapter); |
@@ -1234,7 +1236,7 @@ static int __devexit ibmveth_remove(struct vio_dev *dev) | |||
1234 | int i; | 1236 | int i; |
1235 | 1237 | ||
1236 | for(i = 0; i<IbmVethNumBufferPools; i++) | 1238 | for(i = 0; i<IbmVethNumBufferPools; i++) |
1237 | kobject_unregister(&adapter->rx_buff_pool[i].kobj); | 1239 | kobject_put(&adapter->rx_buff_pool[i].kobj); |
1238 | 1240 | ||
1239 | unregister_netdev(netdev); | 1241 | unregister_netdev(netdev); |
1240 | 1242 | ||