Commit be01da72 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

phy: Centralize setting driver module owner

Rather than have each driver set the driver owner field, do it once in
the core code. This will also help with later changes, when the device
structure will move.
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc87922f
...@@ -72,7 +72,6 @@ static struct phy_driver am79c_driver[] = { { ...@@ -72,7 +72,6 @@ static struct phy_driver am79c_driver[] = { {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = am79c_ack_interrupt, .ack_interrupt = am79c_ack_interrupt,
.config_intr = am79c_config_intr, .config_intr = am79c_config_intr,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(am79c_driver); module_phy_driver(am79c_driver);
......
...@@ -128,7 +128,6 @@ static struct phy_driver aquantia_driver[] = { ...@@ -128,7 +128,6 @@ static struct phy_driver aquantia_driver[] = {
.config_intr = aquantia_config_intr, .config_intr = aquantia_config_intr,
.ack_interrupt = aquantia_ack_interrupt, .ack_interrupt = aquantia_ack_interrupt,
.read_status = aquantia_read_status, .read_status = aquantia_read_status,
.driver = { .owner = THIS_MODULE,},
}, },
{ {
.phy_id = PHY_ID_AQ2104, .phy_id = PHY_ID_AQ2104,
...@@ -141,7 +140,6 @@ static struct phy_driver aquantia_driver[] = { ...@@ -141,7 +140,6 @@ static struct phy_driver aquantia_driver[] = {
.config_intr = aquantia_config_intr, .config_intr = aquantia_config_intr,
.ack_interrupt = aquantia_ack_interrupt, .ack_interrupt = aquantia_ack_interrupt,
.read_status = aquantia_read_status, .read_status = aquantia_read_status,
.driver = { .owner = THIS_MODULE,},
}, },
{ {
.phy_id = PHY_ID_AQR105, .phy_id = PHY_ID_AQR105,
...@@ -154,7 +152,6 @@ static struct phy_driver aquantia_driver[] = { ...@@ -154,7 +152,6 @@ static struct phy_driver aquantia_driver[] = {
.config_intr = aquantia_config_intr, .config_intr = aquantia_config_intr,
.ack_interrupt = aquantia_ack_interrupt, .ack_interrupt = aquantia_ack_interrupt,
.read_status = aquantia_read_status, .read_status = aquantia_read_status,
.driver = { .owner = THIS_MODULE,},
}, },
{ {
.phy_id = PHY_ID_AQR405, .phy_id = PHY_ID_AQR405,
...@@ -167,7 +164,6 @@ static struct phy_driver aquantia_driver[] = { ...@@ -167,7 +164,6 @@ static struct phy_driver aquantia_driver[] = {
.config_intr = aquantia_config_intr, .config_intr = aquantia_config_intr,
.ack_interrupt = aquantia_ack_interrupt, .ack_interrupt = aquantia_ack_interrupt,
.read_status = aquantia_read_status, .read_status = aquantia_read_status,
.driver = { .owner = THIS_MODULE,},
}, },
}; };
......
...@@ -310,9 +310,6 @@ static struct phy_driver at803x_driver[] = { ...@@ -310,9 +310,6 @@ static struct phy_driver at803x_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = at803x_ack_interrupt, .ack_interrupt = at803x_ack_interrupt,
.config_intr = at803x_config_intr, .config_intr = at803x_config_intr,
.driver = {
.owner = THIS_MODULE,
},
}, { }, {
/* ATHEROS 8030 */ /* ATHEROS 8030 */
.phy_id = ATH8030_PHY_ID, .phy_id = ATH8030_PHY_ID,
...@@ -331,9 +328,6 @@ static struct phy_driver at803x_driver[] = { ...@@ -331,9 +328,6 @@ static struct phy_driver at803x_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = at803x_ack_interrupt, .ack_interrupt = at803x_ack_interrupt,
.config_intr = at803x_config_intr, .config_intr = at803x_config_intr,
.driver = {
.owner = THIS_MODULE,
},
}, { }, {
/* ATHEROS 8031 */ /* ATHEROS 8031 */
.phy_id = ATH8031_PHY_ID, .phy_id = ATH8031_PHY_ID,
...@@ -352,9 +346,6 @@ static struct phy_driver at803x_driver[] = { ...@@ -352,9 +346,6 @@ static struct phy_driver at803x_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = &at803x_ack_interrupt, .ack_interrupt = &at803x_ack_interrupt,
.config_intr = &at803x_config_intr, .config_intr = &at803x_config_intr,
.driver = {
.owner = THIS_MODULE,
},
} }; } };
module_phy_driver(at803x_driver); module_phy_driver(at803x_driver);
......
...@@ -56,7 +56,6 @@ static struct phy_driver bcm63xx_driver[] = { ...@@ -56,7 +56,6 @@ static struct phy_driver bcm63xx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
/* same phy as above, with just a different OUI */ /* same phy as above, with just a different OUI */
.phy_id = 0x002bdc00, .phy_id = 0x002bdc00,
...@@ -69,7 +68,6 @@ static struct phy_driver bcm63xx_driver[] = { ...@@ -69,7 +68,6 @@ static struct phy_driver bcm63xx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
} }; } };
module_phy_driver(bcm63xx_driver); module_phy_driver(bcm63xx_driver);
......
...@@ -324,7 +324,6 @@ static int bcm7xxx_dummy_config_init(struct phy_device *phydev) ...@@ -324,7 +324,6 @@ static int bcm7xxx_dummy_config_init(struct phy_device *phydev)
.config_aneg = genphy_config_aneg, \ .config_aneg = genphy_config_aneg, \
.read_status = genphy_read_status, \ .read_status = genphy_read_status, \
.resume = bcm7xxx_28nm_resume, \ .resume = bcm7xxx_28nm_resume, \
.driver = { .owner = THIS_MODULE }, \
} }
static struct phy_driver bcm7xxx_driver[] = { static struct phy_driver bcm7xxx_driver[] = {
...@@ -346,7 +345,6 @@ static struct phy_driver bcm7xxx_driver[] = { ...@@ -346,7 +345,6 @@ static struct phy_driver bcm7xxx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = bcm7xxx_suspend, .suspend = bcm7xxx_suspend,
.resume = bcm7xxx_config_init, .resume = bcm7xxx_config_init,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM7429, .phy_id = PHY_ID_BCM7429,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -359,7 +357,6 @@ static struct phy_driver bcm7xxx_driver[] = { ...@@ -359,7 +357,6 @@ static struct phy_driver bcm7xxx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = bcm7xxx_suspend, .suspend = bcm7xxx_suspend,
.resume = bcm7xxx_config_init, .resume = bcm7xxx_config_init,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM7435, .phy_id = PHY_ID_BCM7435,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -372,7 +369,6 @@ static struct phy_driver bcm7xxx_driver[] = { ...@@ -372,7 +369,6 @@ static struct phy_driver bcm7xxx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = bcm7xxx_suspend, .suspend = bcm7xxx_suspend,
.resume = bcm7xxx_config_init, .resume = bcm7xxx_config_init,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_BCM_OUI_4, .phy_id = PHY_BCM_OUI_4,
.phy_id_mask = 0xffff0000, .phy_id_mask = 0xffff0000,
...@@ -385,7 +381,6 @@ static struct phy_driver bcm7xxx_driver[] = { ...@@ -385,7 +381,6 @@ static struct phy_driver bcm7xxx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = bcm7xxx_suspend, .suspend = bcm7xxx_suspend,
.resume = bcm7xxx_config_init, .resume = bcm7xxx_config_init,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_BCM_OUI_5, .phy_id = PHY_BCM_OUI_5,
.phy_id_mask = 0xffffff00, .phy_id_mask = 0xffffff00,
...@@ -398,7 +393,6 @@ static struct phy_driver bcm7xxx_driver[] = { ...@@ -398,7 +393,6 @@ static struct phy_driver bcm7xxx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = bcm7xxx_suspend, .suspend = bcm7xxx_suspend,
.resume = bcm7xxx_config_init, .resume = bcm7xxx_config_init,
.driver = { .owner = THIS_MODULE },
} }; } };
static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = { static struct mdio_device_id __maybe_unused bcm7xxx_tbl[] = {
......
...@@ -201,7 +201,6 @@ static struct phy_driver bcm87xx_driver[] = { ...@@ -201,7 +201,6 @@ static struct phy_driver bcm87xx_driver[] = {
.config_intr = bcm87xx_config_intr, .config_intr = bcm87xx_config_intr,
.did_interrupt = bcm87xx_did_interrupt, .did_interrupt = bcm87xx_did_interrupt,
.match_phy_device = bcm8706_match_phy_device, .match_phy_device = bcm8706_match_phy_device,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM8727, .phy_id = PHY_ID_BCM8727,
.phy_id_mask = 0xffffffff, .phy_id_mask = 0xffffffff,
...@@ -214,7 +213,6 @@ static struct phy_driver bcm87xx_driver[] = { ...@@ -214,7 +213,6 @@ static struct phy_driver bcm87xx_driver[] = {
.config_intr = bcm87xx_config_intr, .config_intr = bcm87xx_config_intr,
.did_interrupt = bcm87xx_did_interrupt, .did_interrupt = bcm87xx_did_interrupt,
.match_phy_device = bcm8727_match_phy_device, .match_phy_device = bcm8727_match_phy_device,
.driver = { .owner = THIS_MODULE },
} }; } };
module_phy_driver(bcm87xx_driver); module_phy_driver(bcm87xx_driver);
......
...@@ -460,7 +460,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -460,7 +460,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM5421, .phy_id = PHY_ID_BCM5421,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -473,7 +472,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -473,7 +472,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM5461, .phy_id = PHY_ID_BCM5461,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -486,7 +484,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -486,7 +484,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM54616S, .phy_id = PHY_ID_BCM54616S,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -499,7 +496,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -499,7 +496,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM5464, .phy_id = PHY_ID_BCM5464,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -512,7 +508,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -512,7 +508,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM5481, .phy_id = PHY_ID_BCM5481,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -525,7 +520,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -525,7 +520,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM5482, .phy_id = PHY_ID_BCM5482,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -538,7 +532,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -538,7 +532,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = bcm5482_read_status, .read_status = bcm5482_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM50610, .phy_id = PHY_ID_BCM50610,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -551,7 +544,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -551,7 +544,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM50610M, .phy_id = PHY_ID_BCM50610M,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -564,7 +556,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -564,7 +556,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM57780, .phy_id = PHY_ID_BCM57780,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -577,7 +568,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -577,7 +568,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = bcm_phy_ack_intr, .ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr, .config_intr = bcm_phy_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCMAC131, .phy_id = PHY_ID_BCMAC131,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -590,7 +580,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -590,7 +580,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = brcm_fet_ack_interrupt, .ack_interrupt = brcm_fet_ack_interrupt,
.config_intr = brcm_fet_config_intr, .config_intr = brcm_fet_config_intr,
.driver = { .owner = THIS_MODULE },
}, { }, {
.phy_id = PHY_ID_BCM5241, .phy_id = PHY_ID_BCM5241,
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -603,7 +592,6 @@ static struct phy_driver broadcom_drivers[] = { ...@@ -603,7 +592,6 @@ static struct phy_driver broadcom_drivers[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = brcm_fet_ack_interrupt, .ack_interrupt = brcm_fet_ack_interrupt,
.config_intr = brcm_fet_config_intr, .config_intr = brcm_fet_config_intr,
.driver = { .owner = THIS_MODULE },
} }; } };
module_phy_driver(broadcom_drivers); module_phy_driver(broadcom_drivers);
......
...@@ -114,7 +114,6 @@ static struct phy_driver cis820x_driver[] = { ...@@ -114,7 +114,6 @@ static struct phy_driver cis820x_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &cis820x_ack_interrupt, .ack_interrupt = &cis820x_ack_interrupt,
.config_intr = &cis820x_config_intr, .config_intr = &cis820x_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x000fc440, .phy_id = 0x000fc440,
.name = "Cicada Cis8204", .name = "Cicada Cis8204",
...@@ -126,7 +125,6 @@ static struct phy_driver cis820x_driver[] = { ...@@ -126,7 +125,6 @@ static struct phy_driver cis820x_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &cis820x_ack_interrupt, .ack_interrupt = &cis820x_ack_interrupt,
.config_intr = &cis820x_config_intr, .config_intr = &cis820x_config_intr,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(cis820x_driver); module_phy_driver(cis820x_driver);
......
...@@ -156,7 +156,6 @@ static struct phy_driver dm91xx_driver[] = { ...@@ -156,7 +156,6 @@ static struct phy_driver dm91xx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = dm9161_ack_interrupt, .ack_interrupt = dm9161_ack_interrupt,
.config_intr = dm9161_config_intr, .config_intr = dm9161_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x0181b8b0, .phy_id = 0x0181b8b0,
.name = "Davicom DM9161B/C", .name = "Davicom DM9161B/C",
...@@ -168,7 +167,6 @@ static struct phy_driver dm91xx_driver[] = { ...@@ -168,7 +167,6 @@ static struct phy_driver dm91xx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = dm9161_ack_interrupt, .ack_interrupt = dm9161_ack_interrupt,
.config_intr = dm9161_config_intr, .config_intr = dm9161_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x0181b8a0, .phy_id = 0x0181b8a0,
.name = "Davicom DM9161A", .name = "Davicom DM9161A",
...@@ -180,7 +178,6 @@ static struct phy_driver dm91xx_driver[] = { ...@@ -180,7 +178,6 @@ static struct phy_driver dm91xx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = dm9161_ack_interrupt, .ack_interrupt = dm9161_ack_interrupt,
.config_intr = dm9161_config_intr, .config_intr = dm9161_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x00181b80, .phy_id = 0x00181b80,
.name = "Davicom DM9131", .name = "Davicom DM9131",
...@@ -191,7 +188,6 @@ static struct phy_driver dm91xx_driver[] = { ...@@ -191,7 +188,6 @@ static struct phy_driver dm91xx_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = dm9161_ack_interrupt, .ack_interrupt = dm9161_ack_interrupt,
.config_intr = dm9161_config_intr, .config_intr = dm9161_config_intr,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(dm91xx_driver); module_phy_driver(dm91xx_driver);
......
...@@ -1492,12 +1492,11 @@ static struct phy_driver dp83640_driver = { ...@@ -1492,12 +1492,11 @@ static struct phy_driver dp83640_driver = {
.hwtstamp = dp83640_hwtstamp, .hwtstamp = dp83640_hwtstamp,
.rxtstamp = dp83640_rxtstamp, .rxtstamp = dp83640_rxtstamp,
.txtstamp = dp83640_txtstamp, .txtstamp = dp83640_txtstamp,
.driver = {.owner = THIS_MODULE,}
}; };
static int __init dp83640_init(void) static int __init dp83640_init(void)
{ {
return phy_driver_register(&dp83640_driver); return phy_driver_register(&dp83640_driver, THIS_MODULE);
} }
static void __exit dp83640_exit(void) static void __exit dp83640_exit(void)
......
...@@ -88,8 +88,6 @@ static struct phy_driver dp83848_driver[] = { ...@@ -88,8 +88,6 @@ static struct phy_driver dp83848_driver[] = {
/* IRQ related */ /* IRQ related */
.ack_interrupt = dp83848_ack_interrupt, .ack_interrupt = dp83848_ack_interrupt,
.config_intr = dp83848_config_intr, .config_intr = dp83848_config_intr,
.driver = { .owner = THIS_MODULE, },
}, },
}; };
module_phy_driver(dp83848_driver); module_phy_driver(dp83848_driver);
......
...@@ -214,8 +214,6 @@ static struct phy_driver dp83867_driver[] = { ...@@ -214,8 +214,6 @@ static struct phy_driver dp83867_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = {.owner = THIS_MODULE,}
}, },
}; };
module_phy_driver(dp83867_driver); module_phy_driver(dp83867_driver);
......
...@@ -95,7 +95,6 @@ static struct phy_driver et1011c_driver[] = { { ...@@ -95,7 +95,6 @@ static struct phy_driver et1011c_driver[] = { {
.flags = PHY_POLL, .flags = PHY_POLL,
.config_aneg = et1011c_config_aneg, .config_aneg = et1011c_config_aneg,
.read_status = et1011c_read_status, .read_status = et1011c_read_status,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(et1011c_driver); module_phy_driver(et1011c_driver);
......
...@@ -221,7 +221,6 @@ static struct phy_driver icplus_driver[] = { ...@@ -221,7 +221,6 @@ static struct phy_driver icplus_driver[] = {
.read_status = &ip175c_read_status, .read_status = &ip175c_read_status,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x02430d90, .phy_id = 0x02430d90,
.name = "ICPlus IP1001", .name = "ICPlus IP1001",
...@@ -233,7 +232,6 @@ static struct phy_driver icplus_driver[] = { ...@@ -233,7 +232,6 @@ static struct phy_driver icplus_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x02430c54, .phy_id = 0x02430c54,
.name = "ICPlus IP101A/G", .name = "ICPlus IP101A/G",
...@@ -247,7 +245,6 @@ static struct phy_driver icplus_driver[] = { ...@@ -247,7 +245,6 @@ static struct phy_driver icplus_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(icplus_driver); module_phy_driver(icplus_driver);
......
...@@ -278,7 +278,6 @@ static struct phy_driver lxt97x_driver[] = { ...@@ -278,7 +278,6 @@ static struct phy_driver lxt97x_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = lxt970_ack_interrupt, .ack_interrupt = lxt970_ack_interrupt,
.config_intr = lxt970_config_intr, .config_intr = lxt970_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x001378e0, .phy_id = 0x001378e0,
.name = "LXT971", .name = "LXT971",
...@@ -289,7 +288,6 @@ static struct phy_driver lxt97x_driver[] = { ...@@ -289,7 +288,6 @@ static struct phy_driver lxt97x_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = lxt971_ack_interrupt, .ack_interrupt = lxt971_ack_interrupt,
.config_intr = lxt971_config_intr, .config_intr = lxt971_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x00137a10, .phy_id = 0x00137a10,
.name = "LXT973-A2", .name = "LXT973-A2",
...@@ -299,7 +297,6 @@ static struct phy_driver lxt97x_driver[] = { ...@@ -299,7 +297,6 @@ static struct phy_driver lxt97x_driver[] = {
.probe = lxt973_probe, .probe = lxt973_probe,
.config_aneg = lxt973_config_aneg, .config_aneg = lxt973_config_aneg,
.read_status = lxt973a2_read_status, .read_status = lxt973a2_read_status,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x00137a10, .phy_id = 0x00137a10,
.name = "LXT973", .name = "LXT973",
...@@ -309,7 +306,6 @@ static struct phy_driver lxt97x_driver[] = { ...@@ -309,7 +306,6 @@ static struct phy_driver lxt97x_driver[] = {
.probe = lxt973_probe, .probe = lxt973_probe,
.config_aneg = lxt973_config_aneg, .config_aneg = lxt973_config_aneg,
.read_status = genphy_read_status, .read_status = genphy_read_status,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(lxt97x_driver); module_phy_driver(lxt97x_driver);
......
...@@ -1087,7 +1087,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1087,7 +1087,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1112, .phy_id = MARVELL_PHY_ID_88E1112,
...@@ -1106,7 +1105,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1106,7 +1105,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1111, .phy_id = MARVELL_PHY_ID_88E1111,
...@@ -1125,7 +1123,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1125,7 +1123,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1118, .phy_id = MARVELL_PHY_ID_88E1118,
...@@ -1144,7 +1141,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1144,7 +1141,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = {.owner = THIS_MODULE,},
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1121R, .phy_id = MARVELL_PHY_ID_88E1121R,
...@@ -1163,7 +1159,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1163,7 +1159,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1318S, .phy_id = MARVELL_PHY_ID_88E1318S,
...@@ -1184,7 +1179,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1184,7 +1179,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1145, .phy_id = MARVELL_PHY_ID_88E1145,
...@@ -1203,7 +1197,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1203,7 +1197,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1149R, .phy_id = MARVELL_PHY_ID_88E1149R,
...@@ -1222,7 +1215,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1222,7 +1215,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1240, .phy_id = MARVELL_PHY_ID_88E1240,
...@@ -1241,7 +1233,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1241,7 +1233,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1116R, .phy_id = MARVELL_PHY_ID_88E1116R,
...@@ -1260,7 +1251,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1260,7 +1251,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1510, .phy_id = MARVELL_PHY_ID_88E1510,
...@@ -1279,7 +1269,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1279,7 +1269,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E1540, .phy_id = MARVELL_PHY_ID_88E1540,
...@@ -1298,7 +1287,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1298,7 +1287,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
{ {
.phy_id = MARVELL_PHY_ID_88E3016, .phy_id = MARVELL_PHY_ID_88E3016,
...@@ -1319,7 +1307,6 @@ static struct phy_driver marvell_drivers[] = { ...@@ -1319,7 +1307,6 @@ static struct phy_driver marvell_drivers[] = {
.get_sset_count = marvell_get_sset_count, .get_sset_count = marvell_get_sset_count,
.get_strings = marvell_get_strings, .get_strings = marvell_get_strings,
.get_stats = marvell_get_stats, .get_stats = marvell_get_stats,
.driver = { .owner = THIS_MODULE },
}, },
}; };
......
...@@ -706,7 +706,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -706,7 +706,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8021, .phy_id = PHY_ID_KSZ8021,
.phy_id_mask = 0x00ffffff, .phy_id_mask = 0x00ffffff,
...@@ -726,7 +725,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -726,7 +725,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8031, .phy_id = PHY_ID_KSZ8031,
.phy_id_mask = 0x00ffffff, .phy_id_mask = 0x00ffffff,
...@@ -746,7 +744,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -746,7 +744,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8041, .phy_id = PHY_ID_KSZ8041,
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00fffff0,
...@@ -766,7 +763,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -766,7 +763,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8041RNLI, .phy_id = PHY_ID_KSZ8041RNLI,
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00fffff0,
...@@ -786,7 +782,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -786,7 +782,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8051, .phy_id = PHY_ID_KSZ8051,
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00fffff0,
...@@ -806,7 +801,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -806,7 +801,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8001, .phy_id = PHY_ID_KSZ8001,
.name = "Micrel KSZ8001 or KS8721", .name = "Micrel KSZ8001 or KS8721",
...@@ -825,7 +819,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -825,7 +819,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8081, .phy_id = PHY_ID_KSZ8081,
.name = "Micrel KSZ8081 or KSZ8091", .name = "Micrel KSZ8081 or KSZ8091",
...@@ -844,7 +837,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -844,7 +837,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ8061, .phy_id = PHY_ID_KSZ8061,
.name = "Micrel KSZ8061", .name = "Micrel KSZ8061",
...@@ -861,7 +853,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -861,7 +853,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_KSZ9021, .phy_id = PHY_ID_KSZ9021,
.phy_id_mask = 0x000ffffe, .phy_id_mask = 0x000ffffe,
...@@ -881,7 +872,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -881,7 +872,6 @@ static struct phy_driver ksphy_driver[] = {
.resume = genphy_resume, .resume = genphy_resume,
.read_mmd_indirect = ksz9021_rd_mmd_phyreg, .read_mmd_indirect = ksz9021_rd_mmd_phyreg,
.write_mmd_indirect = ksz9021_wr_mmd_phyreg, .write_mmd_indirect = ksz9021_wr_mmd_phyreg,
.driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = PHY_ID_KSZ9031, .phy_id = PHY_ID_KSZ9031,
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00fffff0,
...@@ -899,7 +889,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -899,7 +889,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = PHY_ID_KSZ8873MLL, .phy_id = PHY_ID_KSZ8873MLL,
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00fffff0,
...@@ -914,7 +903,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -914,7 +903,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = PHY_ID_KSZ886X, .phy_id = PHY_ID_KSZ886X,
.phy_id_mask = 0x00fffff0, .phy_id_mask = 0x00fffff0,
...@@ -929,7 +917,6 @@ static struct phy_driver ksphy_driver[] = { ...@@ -929,7 +917,6 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats, .get_stats = kszphy_get_stats,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
} }; } };
module_phy_driver(ksphy_driver); module_phy_driver(ksphy_driver);
......
...@@ -129,8 +129,6 @@ static struct phy_driver microchip_phy_driver[] = { ...@@ -129,8 +129,6 @@ static struct phy_driver microchip_phy_driver[] = {
.suspend = lan88xx_suspend, .suspend = lan88xx_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.set_wol = lan88xx_set_wol, .set_wol = lan88xx_set_wol,
.driver = { .owner = THIS_MODULE, }
} }; } };
module_phy_driver(microchip_phy_driver); module_phy_driver(microchip_phy_driver);
......
...@@ -140,7 +140,6 @@ static struct phy_driver dp83865_driver[] = { { ...@@ -140,7 +140,6 @@ static struct phy_driver dp83865_driver[] = { {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = ns_ack_interrupt, .ack_interrupt = ns_ack_interrupt,
.config_intr = ns_config_intr, .config_intr = ns_config_intr,
.driver = {.owner = THIS_MODULE,}
} }; } };
module_phy_driver(dp83865_driver); module_phy_driver(dp83865_driver);
......
...@@ -1564,8 +1564,9 @@ static int phy_remove(struct device *dev) ...@@ -1564,8 +1564,9 @@ static int phy_remove(struct device *dev)
/** /**
* phy_driver_register - register a phy_driver with the PHY layer * phy_driver_register - register a phy_driver with the PHY layer
* @new_driver: new phy_driver to register * @new_driver: new phy_driver to register
* @owner: module owning this PHY
*/ */
int phy_driver_register(struct phy_driver *new_driver) int phy_driver_register(struct phy_driver *new_driver, struct module *owner)
{ {
int retval; int retval;
...@@ -1573,6 +1574,7 @@ int phy_driver_register(struct phy_driver *new_driver) ...@@ -1573,6 +1574,7 @@ int phy_driver_register(struct phy_driver *new_driver)
new_driver->driver.bus = &mdio_bus_type; new_driver->driver.bus = &mdio_bus_type;
new_driver->driver.probe = phy_probe; new_driver->driver.probe = phy_probe;
new_driver->driver.remove = phy_remove; new_driver->driver.remove = phy_remove;
new_driver->driver.owner = owner;
retval = driver_register(&new_driver->driver); retval = driver_register(&new_driver->driver);
if (retval) { if (retval) {
...@@ -1588,12 +1590,13 @@ int phy_driver_register(struct phy_driver *new_driver) ...@@ -1588,12 +1590,13 @@ int phy_driver_register(struct phy_driver *new_driver)
} }
EXPORT_SYMBOL(phy_driver_register); EXPORT_SYMBOL(phy_driver_register);
int phy_drivers_register(struct phy_driver *new_driver, int n) int phy_drivers_register(struct phy_driver *new_driver, int n,
struct module *owner)
{ {
int i, ret = 0; int i, ret = 0;
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
ret = phy_driver_register(new_driver + i); ret = phy_driver_register(new_driver + i, owner);
if (ret) { if (ret) {
while (i-- > 0) while (i-- > 0)
phy_driver_unregister(new_driver + i); phy_driver_unregister(new_driver + i);
...@@ -1634,7 +1637,6 @@ static struct phy_driver genphy_driver[] = { ...@@ -1634,7 +1637,6 @@ static struct phy_driver genphy_driver[] = {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, { }, {
.phy_id = 0xffffffff, .phy_id = 0xffffffff,
.phy_id_mask = 0xffffffff, .phy_id_mask = 0xffffffff,
...@@ -1646,7 +1648,6 @@ static struct phy_driver genphy_driver[] = { ...@@ -1646,7 +1648,6 @@ static struct phy_driver genphy_driver[] = {
.read_status = gen10g_read_status, .read_status = gen10g_read_status,
.suspend = gen10g_suspend, .suspend = gen10g_suspend,
.resume = gen10g_resume, .resume = gen10g_resume,
.driver = {.owner = THIS_MODULE, },
} }; } };
static int __init phy_init(void) static int __init phy_init(void)
...@@ -1658,7 +1659,7 @@ static int __init phy_init(void) ...@@ -1658,7 +1659,7 @@ static int __init phy_init(void)
return rc; return rc;
rc = phy_drivers_register(genphy_driver, rc = phy_drivers_register(genphy_driver,
ARRAY_SIZE(genphy_driver)); ARRAY_SIZE(genphy_driver), THIS_MODULE);
if (rc) if (rc)
mdio_bus_exit(); mdio_bus_exit();
......
...@@ -122,7 +122,6 @@ static struct phy_driver qs6612_driver[] = { { ...@@ -122,7 +122,6 @@ static struct phy_driver qs6612_driver[] = { {
.read_status = genphy_read_status, .read_status = genphy_read_status,
.ack_interrupt = qs6612_ack_interrupt, .ack_interrupt = qs6612_ack_interrupt,
.config_intr = qs6612_config_intr, .config_intr = qs6612_config_intr,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(qs6612_driver); module_phy_driver(qs6612_driver);
......
...@@ -124,7 +124,6 @@ static struct phy_driver realtek_drvs[] = { ...@@ -124,7 +124,6 @@ static struct phy_driver realtek_drvs[] = {
.flags = PHY_HAS_INTERRUPT, .flags = PHY_HAS_INTERRUPT,
.config_aneg = &genphy_config_aneg, .config_aneg = &genphy_config_aneg,
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x001cc912, .phy_id = 0x001cc912,
.name = "RTL8211B Gigabit Ethernet", .name = "RTL8211B Gigabit Ethernet",
...@@ -135,7 +134,6 @@ static struct phy_driver realtek_drvs[] = { ...@@ -135,7 +134,6 @@ static struct phy_driver realtek_drvs[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &rtl821x_ack_interrupt, .ack_interrupt = &rtl821x_ack_interrupt,
.config_intr = &rtl8211b_config_intr, .config_intr = &rtl8211b_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x001cc914, .phy_id = 0x001cc914,
.name = "RTL8211DN Gigabit Ethernet", .name = "RTL8211DN Gigabit Ethernet",
...@@ -148,7 +146,6 @@ static struct phy_driver realtek_drvs[] = { ...@@ -148,7 +146,6 @@ static struct phy_driver realtek_drvs[] = {
.config_intr = rtl8211e_config_intr, .config_intr = rtl8211e_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x001cc915, .phy_id = 0x001cc915,
.name = "RTL8211E Gigabit Ethernet", .name = "RTL8211E Gigabit Ethernet",
...@@ -161,7 +158,6 @@ static struct phy_driver realtek_drvs[] = { ...@@ -161,7 +158,6 @@ static struct phy_driver realtek_drvs[] = {
.config_intr = &rtl8211e_config_intr, .config_intr = &rtl8211e_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = 0x001cc916, .phy_id = 0x001cc916,
.name = "RTL8211F Gigabit Ethernet", .name = "RTL8211F Gigabit Ethernet",
...@@ -175,7 +171,6 @@ static struct phy_driver realtek_drvs[] = { ...@@ -175,7 +171,6 @@ static struct phy_driver realtek_drvs[] = {
.config_intr = &rtl8211f_config_intr, .config_intr = &rtl8211f_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE },
}, },
}; };
......
...@@ -171,8 +171,6 @@ static struct phy_driver smsc_phy_driver[] = { ...@@ -171,8 +171,6 @@ static struct phy_driver smsc_phy_driver[] = {
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }
}, { }, {
.phy_id = 0x0007c0b0, /* OUI=0x00800f, Model#=0x0b */ .phy_id = 0x0007c0b0, /* OUI=0x00800f, Model#=0x0b */
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -194,8 +192,6 @@ static struct phy_driver smsc_phy_driver[] = { ...@@ -194,8 +192,6 @@ static struct phy_driver smsc_phy_driver[] = {
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }
}, { }, {
.phy_id = 0x0007c0c0, /* OUI=0x00800f, Model#=0x0c */ .phy_id = 0x0007c0c0, /* OUI=0x00800f, Model#=0x0c */
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -217,8 +213,6 @@ static struct phy_driver smsc_phy_driver[] = { ...@@ -217,8 +213,6 @@ static struct phy_driver smsc_phy_driver[] = {
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }
}, { }, {
.phy_id = 0x0007c0d0, /* OUI=0x00800f, Model#=0x0d */ .phy_id = 0x0007c0d0, /* OUI=0x00800f, Model#=0x0d */
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -239,8 +233,6 @@ static struct phy_driver smsc_phy_driver[] = { ...@@ -239,8 +233,6 @@ static struct phy_driver smsc_phy_driver[] = {
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }
}, { }, {
.phy_id = 0x0007c0f0, /* OUI=0x00800f, Model#=0x0f */ .phy_id = 0x0007c0f0, /* OUI=0x00800f, Model#=0x0f */
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0,
...@@ -262,8 +254,6 @@ static struct phy_driver smsc_phy_driver[] = { ...@@ -262,8 +254,6 @@ static struct phy_driver smsc_phy_driver[] = {
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, }
} }; } };
module_phy_driver(smsc_phy_driver); module_phy_driver(smsc_phy_driver);
......
...@@ -95,7 +95,6 @@ static struct phy_driver ste10xp_pdriver[] = { ...@@ -95,7 +95,6 @@ static struct phy_driver ste10xp_pdriver[] = {
.config_intr = ste10Xp_config_intr, .config_intr = ste10Xp_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = {.owner = THIS_MODULE,}
}, { }, {
.phy_id = STE100P_PHY_ID, .phy_id = STE100P_PHY_ID,
.phy_id_mask = 0xffffffff, .phy_id_mask = 0xffffffff,
...@@ -109,7 +108,6 @@ static struct phy_driver ste10xp_pdriver[] = { ...@@ -109,7 +108,6 @@ static struct phy_driver ste10xp_pdriver[] = {
.config_intr = ste10Xp_config_intr, .config_intr = ste10Xp_config_intr,
.suspend = genphy_suspend, .suspend = genphy_suspend,
.resume = genphy_resume, .resume = genphy_resume,
.driver = {.owner = THIS_MODULE,}
} }; } };
module_phy_driver(ste10xp_pdriver); module_phy_driver(ste10xp_pdriver);
......
...@@ -108,7 +108,6 @@ static struct phy_driver teranetics_driver[] = { ...@@ -108,7 +108,6 @@ static struct phy_driver teranetics_driver[] = {
.config_aneg = teranetics_config_aneg, .config_aneg = teranetics_config_aneg,
.read_status = teranetics_read_status, .read_status = teranetics_read_status,
.match_phy_device = teranetics_match_phy_device, .match_phy_device = teranetics_match_phy_device,
.driver = { .owner = THIS_MODULE,},
}, },
}; };
......
...@@ -236,7 +236,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -236,7 +236,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_VSC8244, .phy_id = PHY_ID_VSC8244,
.name = "Vitesse VSC8244", .name = "Vitesse VSC8244",
...@@ -248,7 +247,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -248,7 +247,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_VSC8514, .phy_id = PHY_ID_VSC8514,
.name = "Vitesse VSC8514", .name = "Vitesse VSC8514",
...@@ -260,7 +258,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -260,7 +258,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_VSC8574, .phy_id = PHY_ID_VSC8574,
.name = "Vitesse VSC8574", .name = "Vitesse VSC8574",
...@@ -272,7 +269,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -272,7 +269,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_VSC8601, .phy_id = PHY_ID_VSC8601,
.name = "Vitesse VSC8601", .name = "Vitesse VSC8601",
...@@ -284,7 +280,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -284,7 +280,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
.phy_id = PHY_ID_VSC8662, .phy_id = PHY_ID_VSC8662,
.name = "Vitesse VSC8662", .name = "Vitesse VSC8662",
...@@ -296,7 +291,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -296,7 +291,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
/* Vitesse 8221 */ /* Vitesse 8221 */
.phy_id = PHY_ID_VSC8221, .phy_id = PHY_ID_VSC8221,
...@@ -309,7 +303,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -309,7 +303,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
}, { }, {
/* Vitesse 8211 */ /* Vitesse 8211 */
.phy_id = PHY_ID_VSC8211, .phy_id = PHY_ID_VSC8211,
...@@ -322,7 +315,6 @@ static struct phy_driver vsc82xx_driver[] = { ...@@ -322,7 +315,6 @@ static struct phy_driver vsc82xx_driver[] = {
.read_status = &genphy_read_status, .read_status = &genphy_read_status,
.ack_interrupt = &vsc824x_ack_interrupt, .ack_interrupt = &vsc824x_ack_interrupt,
.config_intr = &vsc82xx_config_intr, .config_intr = &vsc82xx_config_intr,
.driver = { .owner = THIS_MODULE,},
} }; } };
module_phy_driver(vsc82xx_driver); module_phy_driver(vsc82xx_driver);
......
...@@ -797,8 +797,9 @@ int genphy_resume(struct phy_device *phydev); ...@@ -797,8 +797,9 @@ int genphy_resume(struct phy_device *phydev);
int genphy_soft_reset(struct phy_device *phydev); int genphy_soft_reset(struct phy_device *phydev);
void phy_driver_unregister(struct phy_driver *drv); void phy_driver_unregister(struct phy_driver *drv);
void phy_drivers_unregister(struct phy_driver *drv, int n); void phy_drivers_unregister(struct phy_driver *drv, int n);
int phy_driver_register(struct phy_driver *new_driver); int phy_driver_register(struct phy_driver *new_driver, struct module *owner);
int phy_drivers_register(struct phy_driver *new_driver, int n); int phy_drivers_register(struct phy_driver *new_driver, int n,
struct module *owner);
void phy_state_machine(struct work_struct *work); void phy_state_machine(struct work_struct *work);
void phy_change(struct work_struct *work); void phy_change(struct work_struct *work);
void phy_mac_interrupt(struct phy_device *phydev, int new_link); void phy_mac_interrupt(struct phy_device *phydev, int new_link);
...@@ -843,7 +844,7 @@ extern struct bus_type mdio_bus_type; ...@@ -843,7 +844,7 @@ extern struct bus_type mdio_bus_type;
#define phy_module_driver(__phy_drivers, __count) \ #define phy_module_driver(__phy_drivers, __count) \
static int __init phy_module_init(void) \ static int __init phy_module_init(void) \
{ \ { \
return phy_drivers_register(__phy_drivers, __count); \ return phy_drivers_register(__phy_drivers, __count, THIS_MODULE); \
} \ } \
module_init(phy_module_init); \ module_init(phy_module_init); \
static void __exit phy_module_exit(void) \ static void __exit phy_module_exit(void) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment