net: stmmac: socfpga: re-use the `interface` parameter from platform data
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Mon, 16 Sep 2019 07:04:00 +0000 (10:04 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Sep 2019 07:22:24 +0000 (09:22 +0200)
commit5f109d45a4768a4bf8b5d6a8f305039bcd4f3e87
tree205eddc631f267cf895512125419531654583721
parent95cf66747fc29e6be457e938f89d13e25cea8da3
net: stmmac: socfpga: re-use the `interface` parameter from platform data

The socfpga sub-driver defines an `interface` field in the `socfpga_dwmac`
struct and parses it on init.

The shared `stmmac_probe_config_dt()` function also parses this from the
device-tree and makes it available on the returned `plat_data` (which is
the same data available via `netdev_priv()`).

All that's needed now is to dig that information out, via some
`dev_get_drvdata()` && `netdev_priv()` calls and re-use it.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c