driver core: auxiliary bus: Add driver data helpers

Adds get/set driver data helpers for auxiliary devices.

Reviewed-by: Mark Gross <markgross@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20211208015015.891275-3-david.e.box@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
David E. Box 2021-12-07 17:50:11 -08:00 коммит произвёл Greg Kroah-Hartman
Родитель 80b3485f7d
Коммит 365481e42a
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -188,6 +188,16 @@ struct auxiliary_driver {
const struct auxiliary_device_id *id_table;
};
static inline void *auxiliary_get_drvdata(struct auxiliary_device *auxdev)
{
return dev_get_drvdata(&auxdev->dev);
}
static inline void auxiliary_set_drvdata(struct auxiliary_device *auxdev, void *data)
{
dev_set_drvdata(&auxdev->dev, data);
}
static inline struct auxiliary_device *to_auxiliary_dev(struct device *dev)
{
return container_of(dev, struct auxiliary_device, dev);