mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
include: mdio: Add driver data helpers
Add set/get drv_data helpers for mdio device. Signed-off-by: Harini Katakam <harini.katakam@xilinx.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1ddee6d843
commit
36b1a2fcd0
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user