aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/marvell.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r--drivers/net/phy/marvell.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 418928d644bf..5d2a3f215887 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -826,28 +826,14 @@ static struct phy_driver marvell_drivers[] = {
826 826
827static int __init marvell_init(void) 827static int __init marvell_init(void)
828{ 828{
829 int ret; 829 return phy_drivers_register(marvell_drivers,
830 int i; 830 ARRAY_SIZE(marvell_drivers));
831
832 for (i = 0; i < ARRAY_SIZE(marvell_drivers); i++) {
833 ret = phy_driver_register(&marvell_drivers[i]);
834
835 if (ret) {
836 while (i-- > 0)
837 phy_driver_unregister(&marvell_drivers[i]);
838 return ret;
839 }
840 }
841
842 return 0;
843} 831}
844 832
845static void __exit marvell_exit(void) 833static void __exit marvell_exit(void)
846{ 834{
847 int i; 835 phy_drivers_unregister(marvell_drivers,
848 836 ARRAY_SIZE(marvell_drivers));
849 for (i = 0; i < ARRAY_SIZE(marvell_drivers); i++)
850 phy_driver_unregister(&marvell_drivers[i]);
851} 837}
852 838
853module_init(marvell_init); 839module_init(marvell_init);