diff options
| author | Uwe Kleine-König <[email protected]> | 2021-12-30 16:02:41 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-12-30 17:44:06 +0100 |
| commit | 5207fb2f311b0c45a9abfa1c84b7a7b657ffa550 (patch) | |
| tree | 316ddaf26e9fda72b94b5e2a56cd3632e7042b54 /include/linux | |
| parent | 0880603c8401505d237c8bfd29538a064e3aaf0f (diff) | |
counter: Provide a wrapper to access device private data
For now this just wraps accessing struct counter_device::priv. However
this is about to change and converting drivers to this helper
individually makes fixing device lifetime issues result in easier to
review patches.
Reviewed-by: Jonathan Cameron <[email protected]>
Acked-by: William Breathitt Gray <[email protected]>
Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/counter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/counter.h b/include/linux/counter.h index dfbde2808998..627f1757f6bb 100644 --- a/include/linux/counter.h +++ b/include/linux/counter.h @@ -329,6 +329,8 @@ struct counter_device { struct mutex ops_exist_lock; }; +void *counter_priv(const struct counter_device *const counter); + int counter_register(struct counter_device *const counter); void counter_unregister(struct counter_device *const counter); int devm_counter_register(struct device *dev, |