]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Allow building mdio-boardinfo into the kernel
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 28 Mar 2017 19:57:09 +0000 (12:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Mar 2017 17:32:32 +0000 (10:32 -0700)
commit2d04637d695644b8199989e811973830ba4a11a8
treedc8654d74617544aae372ba6fc13fdf9bd446f58
parent870eb0f0c66a3ad9de28bdd2ec129ce513f9ca3c
net: phy: Allow building mdio-boardinfo into the kernel

mdio-boardinfo contains code that is helpful for platforms to register
specific MDIO bus devices independent of how CONFIG_MDIO_DEVICE or
CONFIG_PHYLIB will be selected (modular or built-in). In order to make
that possible, let's do the following:

- descend into drivers/net/phy/ unconditionally

- make mdiobus_setup_mdiodev_from_board_info() take a callback argument
  which allows us not to expose the internal MDIO board info list and
  mutex, yet maintain the logic within the same file

- relocate the code that creates a MDIO device into
  drivers/net/phy/mdio_bus.c

- build mdio-boardinfo.o into the kernel as soon as MDIO_DEVICE is
  defined (y or m)

Fixes: 66627e97e10e ("net: phy: Allow splitting MDIO bus/device support from PHYs")
Fixes: 63a6e34cce1e ("net: phy: Allow pre-declaration of MDIO devices")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/Makefile
drivers/net/phy/Makefile
drivers/net/phy/mdio-boardinfo.c
drivers/net/phy/mdio-boardinfo.h
drivers/net/phy/mdio_bus.c