mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
net: mdio: fix owner field for mdio buses registered using ACPI
Bus ownership is wrong when using acpi_mdiobus_register() to register an
mdio bus. That function is not inline, so when it calls
mdiobus_register() the wrong THIS_MODULE value is captured.
CC: Maxime Bizon <mbizon@freebox.fr>
Fixes: 803ca24d2f ("net: mdio: Add ACPI support code for mdio")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
99669259f3
commit
30b605b850
@@ -9,7 +9,14 @@
|
||||
#include <linux/phy.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_ACPI_MDIO)
|
||||
int acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode);
|
||||
int __acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode,
|
||||
struct module *owner);
|
||||
|
||||
static inline int
|
||||
acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *handle)
|
||||
{
|
||||
return __acpi_mdiobus_register(mdio, handle, THIS_MODULE);
|
||||
}
|
||||
#else /* CONFIG_ACPI_MDIO */
|
||||
static inline int
|
||||
acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode)
|
||||
|
||||
Reference in New Issue
Block a user