diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-26 21:06:30 +0200 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-03-28 02:33:24 +0200 |
commit | cb52d8970eee65bf2c47d9a91bd4f58b17f595f4 (patch) | |
tree | 43521ba99805f293e09a284901cb5435afeab789 /drivers/net | |
parent | powerpc: Random little legacy iSeries removal tidy ups (diff) | |
download | linux-cb52d8970eee65bf2c47d9a91bd4f58b17f595f4.tar.xz linux-cb52d8970eee65bf2c47d9a91bd4f58b17f595f4.zip |
powerpc+sparc/vio: Modernize driver registration
This makes vio_register_driver() get the module owner & name at compile
time like PCI drivers do, and adds a name pointer directly in struct
vio_driver to avoid having to explicitly initialize the embedded
struct device.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmveth.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 5 |
2 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index e877371680a9..9010cea68bc3 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c @@ -1616,11 +1616,8 @@ static struct vio_driver ibmveth_driver = { .probe = ibmveth_probe, .remove = ibmveth_remove, .get_desired_dma = ibmveth_get_desired_dma, - .driver = { - .name = ibmveth_driver_name, - .owner = THIS_MODULE, - .pm = &ibmveth_pm_ops, - } + .name = ibmveth_driver_name, + .pm = &ibmveth_pm_ops, }; static int __init ibmveth_module_init(void) diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 92a037a8228a..38e3ae9155b7 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c @@ -1259,10 +1259,7 @@ static struct vio_driver vnet_port_driver = { .id_table = vnet_port_match, .probe = vnet_port_probe, .remove = vnet_port_remove, - .driver = { - .name = "vnet_port", - .owner = THIS_MODULE, - } + .name = "vnet_port", }; static int __init vnet_init(void) |