diff options
| author | David S. Miller <[email protected]> | 2019-09-05 12:32:06 +0200 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-09-05 12:32:06 +0200 |
| commit | 1e6068899c0fda0e996ee6428ea2f320df084bb6 (patch) | |
| tree | 945368660310b564a4ae72fde8229ef01fae97ab /include | |
| parent | 1ddee6d843d841414039414923620c8160aec623 (diff) | |
| parent | 168f7a1616081832bcfd710c2b5eaeb848eacebb (diff) | |
Merge branch 'Fix-GMII2RGMII-private-field'
Harini Katakam says:
====================
Fix GMII2RGMII private field
Fix the usage of external phy's priv field by gmii2rgmii driver.
Based on net-next.
====================
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mdio.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mdio.h b/include/linux/mdio.h index e8242ad88c81..a7604248777b 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -68,6 +68,17 @@ struct mdio_driver { #define to_mdio_driver(d) \ container_of(to_mdio_common_driver(d), struct mdio_driver, mdiodrv) +/* device driver data */ +static inline void mdiodev_set_drvdata(struct mdio_device *mdio, void *data) +{ + dev_set_drvdata(&mdio->dev, data); +} + +static inline void *mdiodev_get_drvdata(struct mdio_device *mdio) +{ + return dev_get_drvdata(&mdio->dev); +} + void mdio_device_free(struct mdio_device *mdiodev); struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr); int mdio_device_register(struct mdio_device *mdiodev); |