aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/iio_core.h
diff options
context:
space:
mode:
authorAlexandru Ardelean <alexandru.ardelean@analog.com>2021-02-15 12:40:32 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-11 20:47:04 +0000
commit3e3d11b2e43b9a967d98261250c19636b893b7ed (patch)
tree6b2f3b0b3665fa66e43627cbec9031e53710ddcc /drivers/iio/iio_core.h
parentiio: core: merge buffer/ & scan_elements/ attributes (diff)
downloadlinux-dev-3e3d11b2e43b9a967d98261250c19636b893b7ed.tar.xz
linux-dev-3e3d11b2e43b9a967d98261250c19636b893b7ed.zip
iio: add reference to iio buffer on iio_dev_attr
This change adds a reference to a 'struct iio_buffer' object on the iio_dev_attr object. This way, we can use the created iio_dev_attr objects on per-buffer basis (since they're allocated anyway). A minor downside of this change is that the number of parameters on __iio_add_chan_devattr() grows by 1. This looks like it could do with a bit of a re-think. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Link: https://lore.kernel.org/r/20210215104043.91251-14-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/iio_core.h')
-rw-r--r--drivers/iio/iio_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/iio_core.h b/drivers/iio/iio_core.h
index 7d5b179c1fe7..731f5170d5b9 100644
--- a/drivers/iio/iio_core.h
+++ b/drivers/iio/iio_core.h
@@ -12,6 +12,7 @@
#include <linux/kernel.h>
#include <linux/device.h>
+struct iio_buffer;
struct iio_chan_spec;
struct iio_dev;
@@ -43,6 +44,7 @@ int __iio_add_chan_devattr(const char *postfix,
u64 mask,
enum iio_shared_by shared_by,
struct device *dev,
+ struct iio_buffer *buffer,
struct list_head *attr_list);
void iio_free_chan_devattr_list(struct list_head *attr_list);