summaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2014-09-15 13:00:27 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-15 17:24:20 -0400
commitb4d2394d01bc642e95b2cba956d908423c1bef77 (patch)
tree348e36396eda758e021a8473b330c19cd571e76f /net/dsa/slave.c
parent5075314e4e4b559cc37675ad8a721a89bccd6284 (diff)
downloadop-kernel-dev-b4d2394d01bc642e95b2cba956d908423c1bef77.zip
op-kernel-dev-b4d2394d01bc642e95b2cba956d908423c1bef77.tar.gz
dsa: Replace mii_bus with a generic host device
This change makes it so that instead of passing and storing a mii_bus we instead pass and store a host_dev. From there we can test to determine the exact type of device, and can verify it is the correct device for our switch. So for example it would be possible to pass a device pointer from a pci_dev and instead of checking for a PHY ID we could check for a vendor and/or device ID. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index e38a331..90c9689 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -44,7 +44,7 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds)
ds->slave_mii_bus->write = dsa_slave_phy_write;
snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "dsa-%d:%.2x",
ds->index, ds->pd->sw_addr);
- ds->slave_mii_bus->parent = &ds->master_mii_bus->dev;
+ ds->slave_mii_bus->parent = ds->master_dev;
}
OpenPOWER on IntegriCloud