Commit 1b0acbfd authored by Joachim Eastwood's avatar Joachim Eastwood Committed by Kevin Hilman

stmmac: introduce get_stmmac_bsp_priv() helper

Create a helper to retrieve dwmac private data from a dev
pointer. This is useful in PM callbacks and driver remove.
Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
Tested-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
parent 6aee1597
...@@ -30,4 +30,12 @@ int stmmac_get_platform_resources(struct platform_device *pdev, ...@@ -30,4 +30,12 @@ int stmmac_get_platform_resources(struct platform_device *pdev,
int stmmac_pltfr_remove(struct platform_device *pdev); int stmmac_pltfr_remove(struct platform_device *pdev);
extern const struct dev_pm_ops stmmac_pltfr_pm_ops; extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
static inline void *get_stmmac_bsp_priv(struct device *dev)
{
struct net_device *ndev = dev_get_drvdata(dev);
struct stmmac_priv *priv = netdev_priv(ndev);
return priv->plat->bsp_priv;
}
#endif /* __STMMAC_PLATFORM_H__ */ #endif /* __STMMAC_PLATFORM_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment