summaryrefslogtreecommitdiff
path: root/drivers/counter
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/counter')
-rw-r--r--drivers/counter/counter-core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/counter/counter-core.c b/drivers/counter/counter-core.c
index f053a43c6c04..00c41f28c101 100644
--- a/drivers/counter/counter-core.c
+++ b/drivers/counter/counter-core.c
@@ -46,6 +46,18 @@ static struct bus_type counter_bus_type = {
static dev_t counter_devt;
/**
+ * counter_priv - access counter device private data
+ * @counter: counter device
+ *
+ * Get the counter device private data
+ */
+void *counter_priv(const struct counter_device *const counter)
+{
+ return counter->priv;
+}
+EXPORT_SYMBOL_GPL(counter_priv);
+
+/**
* counter_register - register Counter to the system
* @counter: pointer to Counter to register
*