Messages in this thread Patch in this message |  | | From | Andy Shevchenko <> | | Subject | [PATCH net-next v1 5/5] net: mdiobus: Hide acpi_mdio.h | | Date | Mon, 4 May 2026 09:29:56 +0200 |
| |
No more users outside of MDIO framework.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/net/mdio/acpi_mdio.c | 3 ++- drivers/net/mdio/fwnode_mdio.c | 3 ++- drivers/net/mdio/mdio.h | 4 ++++ include/linux/acpi_mdio.h | 33 --------------------------------- 4 files changed, 8 insertions(+), 35 deletions(-) create mode 100644 drivers/net/mdio/mdio.h delete mode 100644 include/linux/acpi_mdio.h
diff --git a/drivers/net/mdio/acpi_mdio.c b/drivers/net/mdio/acpi_mdio.c index 5d0f11f280cf..15c3fc05fad5 100644 --- a/drivers/net/mdio/acpi_mdio.c +++ b/drivers/net/mdio/acpi_mdio.c @@ -7,13 +7,14 @@ */ #include <linux/acpi.h> -#include <linux/acpi_mdio.h> #include <linux/bits.h> #include <linux/dev_printk.h> #include <linux/fwnode_mdio.h> #include <linux/module.h> #include <linux/types.h> +#include "mdio.h" + MODULE_AUTHOR("Calvin Johnson <calvin.johnson@oss.nxp.com>"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("ACPI MDIO bus (Ethernet PHY) accessors"); diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c index 7541df43ba6d..610753d55262 100644 --- a/drivers/net/mdio/fwnode_mdio.c +++ b/drivers/net/mdio/fwnode_mdio.c @@ -7,7 +7,6 @@ */ #include <linux/acpi.h> -#include <linux/acpi_mdio.h> #include <linux/dev_printk.h> #include <linux/fwnode_mdio.h> #include <linux/of.h> @@ -15,6 +14,8 @@ #include <linux/phy.h> #include <linux/pse-pd/pse.h> +#include "mdio.h" + MODULE_AUTHOR("Calvin Johnson <calvin.johnson@oss.nxp.com>"); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("FWNODE MDIO bus (Ethernet PHY) accessors"); diff --git a/drivers/net/mdio/mdio.h b/drivers/net/mdio/mdio.h new file mode 100644 index 000000000000..c053bb05368a --- /dev/null +++ b/drivers/net/mdio/mdio.h @@ -0,0 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +int __acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode, + struct module *owner); diff --git a/include/linux/acpi_mdio.h b/include/linux/acpi_mdio.h deleted file mode 100644 index 8e2eefa9fbc0..000000000000 --- a/include/linux/acpi_mdio.h +++ /dev/null @@ -1,33 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * ACPI helper for the MDIO (Ethernet PHY) API - */ - -#ifndef __LINUX_ACPI_MDIO_H -#define __LINUX_ACPI_MDIO_H - -#include <linux/phy.h> - -#if IS_ENABLED(CONFIG_ACPI_MDIO) -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) -{ - /* - * Fall back to mdiobus_register() function to register a bus. - * This way, we don't have to keep compat bits around in drivers. - */ - - return mdiobus_register(mdio); -} -#endif - -#endif /* __LINUX_ACPI_MDIO_H */ -- 2.50.1
|  |