Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50fd7150 authored by Johan Hovold's avatar Johan Hovold Committed by David S. Miller
Browse files

net: phy: replace phy_drivers_register calls



Replace module init/exit which only calls phy_drivers_register with
module_phy_driver macro.

Tested using Micrel driver, and otherwise compile-tested only.

Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 116dffa0
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -1468,20 +1468,7 @@ static struct phy_driver amd_xgbe_phy_driver[] = {
	},
};

static int __init amd_xgbe_phy_init(void)
{
	return phy_drivers_register(amd_xgbe_phy_driver,
				    ARRAY_SIZE(amd_xgbe_phy_driver));
}

static void __exit amd_xgbe_phy_exit(void)
{
	phy_drivers_unregister(amd_xgbe_phy_driver,
			       ARRAY_SIZE(amd_xgbe_phy_driver));
}

module_init(amd_xgbe_phy_init);
module_exit(amd_xgbe_phy_exit);
module_phy_driver(amd_xgbe_phy_driver);

static struct mdio_device_id __maybe_unused amd_xgbe_phy_ids[] = {
	{ XGBE_PHY_ID, XGBE_PHY_MASK },
+1 −13
Original line number Diff line number Diff line
@@ -352,19 +352,7 @@ static struct phy_driver at803x_driver[] = {
	},
} };

static int __init atheros_init(void)
{
	return phy_drivers_register(at803x_driver,
				    ARRAY_SIZE(at803x_driver));
}

static void __exit atheros_exit(void)
{
	phy_drivers_unregister(at803x_driver, ARRAY_SIZE(at803x_driver));
}

module_init(atheros_init);
module_exit(atheros_exit);
module_phy_driver(at803x_driver);

static struct mdio_device_id __maybe_unused atheros_tbl[] = {
	{ ATH8030_PHY_ID, 0xffffffef },
+1 −14
Original line number Diff line number Diff line
@@ -100,20 +100,7 @@ static struct phy_driver bcm63xx_driver[] = {
	.driver		= { .owner = THIS_MODULE },
} };

static int __init bcm63xx_phy_init(void)
{
	return phy_drivers_register(bcm63xx_driver,
		ARRAY_SIZE(bcm63xx_driver));
}

static void __exit bcm63xx_phy_exit(void)
{
	phy_drivers_unregister(bcm63xx_driver,
		ARRAY_SIZE(bcm63xx_driver));
}

module_init(bcm63xx_phy_init);
module_exit(bcm63xx_phy_exit);
module_phy_driver(bcm63xx_driver);

static struct mdio_device_id __maybe_unused bcm63xx_tbl[] = {
	{ 0x00406000, 0xfffffc00 },
+1 −14
Original line number Diff line number Diff line
@@ -416,20 +416,7 @@ static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
	{ }
};

static int __init bcm7xxx_phy_init(void)
{
	return phy_drivers_register(bcm7xxx_driver,
			ARRAY_SIZE(bcm7xxx_driver));
}

static void __exit bcm7xxx_phy_exit(void)
{
	phy_drivers_unregister(bcm7xxx_driver,
			ARRAY_SIZE(bcm7xxx_driver));
}

module_init(bcm7xxx_phy_init);
module_exit(bcm7xxx_phy_exit);
module_phy_driver(bcm7xxx_driver);

MODULE_DEVICE_TABLE(mdio, bcm7xxx_tbl);

+1 −13
Original line number Diff line number Diff line
@@ -216,18 +216,6 @@ static struct phy_driver bcm87xx_driver[] = {
	.driver		= { .owner = THIS_MODULE },
} };

static int __init bcm87xx_init(void)
{
	return phy_drivers_register(bcm87xx_driver,
		ARRAY_SIZE(bcm87xx_driver));
}
module_init(bcm87xx_init);

static void __exit bcm87xx_exit(void)
{
	phy_drivers_unregister(bcm87xx_driver,
		ARRAY_SIZE(bcm87xx_driver));
}
module_exit(bcm87xx_exit);
module_phy_driver(bcm87xx_driver);

MODULE_LICENSE("GPL");
Loading