summaryrefslogtreecommitdiff
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-01-06 20:11:22 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-07 14:31:27 -0500
commitbe01da72b1b832b89fbdf59ae6f1b60e53ca2987 (patch)
treee21e0cd75a0e602153fb669e603170832aa825ce /include/linux/phy.h
parentbc87922ff59d364a33e9bce0febdef21a7fbd2af (diff)
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: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 2d7beef20825..49e4418822b3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -797,8 +797,9 @@ int genphy_resume(struct phy_device *phydev);
int genphy_soft_reset(struct phy_device *phydev);
void phy_driver_unregister(struct phy_driver *drv);
void phy_drivers_unregister(struct phy_driver *drv, int n);
-int phy_driver_register(struct phy_driver *new_driver);
-int phy_drivers_register(struct phy_driver *new_driver, int n);
+int phy_driver_register(struct phy_driver *new_driver, struct module *owner);
+int phy_drivers_register(struct phy_driver *new_driver, int n,
+ struct module *owner);
void phy_state_machine(struct work_struct *work);
void phy_change(struct work_struct *work);
void phy_mac_interrupt(struct phy_device *phydev, int new_link);
@@ -843,7 +844,7 @@ extern struct bus_type mdio_bus_type;
#define phy_module_driver(__phy_drivers, __count) \
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); \
static void __exit phy_module_exit(void) \