summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2021-12-07 17:50:11 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-12-22 13:56:19 +0100
commit365481e42a8a95c55e43e8cc236138718e762e7b (patch)
tree197c3a04fb91718c5abf86688d8570285904fbdf
parent80b3485f7d7bdb2468f2a9d6a346a1132d248309 (diff)
downloadlinux-stable-365481e42a8a95c55e43e8cc236138718e762e7b.tar.gz
linux-stable-365481e42a8a95c55e43e8cc236138718e762e7b.tar.bz2
linux-stable-365481e42a8a95c55e43e8cc236138718e762e7b.zip
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>
-rw-r--r--include/linux/auxiliary_bus.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h
index e6d8b5c16226..de21d9d24a95 100644
--- a/include/linux/auxiliary_bus.h
+++ b/include/linux/auxiliary_bus.h
@@ -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);