OSDN Git Service

net: axienet: fix MDIO bus naming
authorRobert Hancock <hancock@sedsystems.ca>
Thu, 6 Jun 2019 22:28:07 +0000 (16:28 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Jun 2019 23:24:29 +0000 (16:24 -0700)
commit88a972d74ea9172a156cdffb6bb30fbb4b1e27c6
treeeab4d24bd02ec011337ee153d0bc4092347b42fd
parentd85f5f3e4eb38300642d2b54c5740b351c0bdcc5
net: axienet: fix MDIO bus naming

The MDIO bus for this driver was being named using the result of
of_address_to_resource on a node which may not have any resource on it,
but the return value of that call was not checked so it was using some
random value in the bus name. Change to name the MDIO bus based on the
resource start of the actual Ethernet register block.

Signed-off-by: Robert Hancock <hancock@sedsystems.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c