[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211208015015.891275-3-david.e.box@linux.intel.com>
Date: Tue, 7 Dec 2021 17:50:11 -0800
From: "David E. Box" <david.e.box@...ux.intel.com>
To: lee.jones@...aro.org, hdegoede@...hat.com,
david.e.box@...ux.intel.com, bhelgaas@...gle.com,
gregkh@...uxfoundation.org, andriy.shevchenko@...ux.intel.com,
srinivas.pandruvada@...el.com, mgross@...ux.intel.com
Cc: linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
linux-pci@...r.kernel.org, Mark Gross <markgross@...nel.org>
Subject: [PATCH RESEND V2 2/6] driver core: auxiliary bus: Add driver data helpers
Adds get/set driver data helpers for auxiliary devices.
Signed-off-by: David E. Box <david.e.box@...ux.intel.com>
Reviewed-by: Mark Gross <markgross@...nel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
V2
- No changes
include/linux/auxiliary_bus.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/linux/auxiliary_bus.h b/include/linux/auxiliary_bus.h
index fc51d45f106b..a8338d456e81 100644
--- a/include/linux/auxiliary_bus.h
+++ b/include/linux/auxiliary_bus.h
@@ -28,6 +28,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);
--
2.25.1
Powered by blists - more mailing lists