net-next: stmmac: add optional setup function
Instead of adding more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3874191898
commit
ec33d71de7
@@ -3933,7 +3933,9 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
|
||||
struct mac_device_info *mac;
|
||||
|
||||
/* Identify the MAC HW device */
|
||||
if (priv->plat->has_gmac) {
|
||||
if (priv->plat->setup) {
|
||||
mac = priv->plat->setup(priv);
|
||||
} else if (priv->plat->has_gmac) {
|
||||
priv->dev->priv_flags |= IFF_UNICAST_FLT;
|
||||
mac = dwmac1000_setup(priv->ioaddr,
|
||||
priv->plat->multicast_filter_bins,
|
||||
|
Reference in New Issue
Block a user