net: mdio: fix owner field for mdio buses registered using device-tree
[linux-block.git] / include / linux / acpi_mdio.h
CommitLineData
803ca24d
CJ
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * ACPI helper for the MDIO (Ethernet PHY) API
4 */
5
6#ifndef __LINUX_ACPI_MDIO_H
7#define __LINUX_ACPI_MDIO_H
8
9#include <linux/phy.h>
10
11#if IS_ENABLED(CONFIG_ACPI_MDIO)
12int acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode);
13#else /* CONFIG_ACPI_MDIO */
14static inline int
15acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode)
16{
17 /*
18 * Fall back to mdiobus_register() function to register a bus.
19 * This way, we don't have to keep compat bits around in drivers.
20 */
21
22 return mdiobus_register(mdio);
23}
24#endif
25
26#endif /* __LINUX_ACPI_MDIO_H */