phylib: Support registering a bunch of drivers

If registering of one of them fails, all already registered drivers
of this module will be unregistered.

Use the new register/unregister functions in all drivers
registering more than one driver.

amd.c, realtek.c: Simplify: directly return registration result.

Tested with broadcom.c
All others compile-tested.

Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christian Hohnstaedt
2012-07-04 05:44:34 +00:00
committed by David S. Miller
parent 567990cfcc
commit d5bf9071e7
16 changed files with 159 additions and 431 deletions

View File

@@ -65,11 +65,7 @@ static struct phy_driver rtl821x_driver = {
static int __init realtek_init(void)
{
int ret;
ret = phy_driver_register(&rtl821x_driver);
return ret;
return phy_driver_register(&rtl821x_driver);
}
static void __exit realtek_exit(void)