diff options
| author | Hans de Goede <[email protected]> | 2020-11-25 09:46:06 +0100 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2021-01-09 14:25:27 +0000 |
| commit | 18b4c9cd96597afce3bf344fcd64cfc3d2a8a891 (patch) | |
| tree | a156367b0947940ef5d5a0382489bee0d8006962 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
| parent | 2a9685d1a3b7644ca08d8355fc238b43faef7c3e (diff) | |
iio: core: Copy iio_info.attrs->is_visible into iio_dev_opaque.chan_attr_group.is_visible
The iio-core extends the attr_group provided by the driver with its
own attributes. To be able to do this it:
1. Has its own (non const) io_dev_opaque.chan_attr_group attr_group struct
2. It allocates a new attrs array with room for both the drivers and its
own attributes
3. It copies over the driver provided attributes into the newly allocated
attrs array.
But the drivers attr_group may contain more then just the attrs array, it
may also contain an is_visible callback and at least the adi-axi-adc.c
is currently defining such a callback.
Change the attr_group copying code to also copy over the is_visible
callback, so that drivers can define one and have it workins as is
normal for attr_group-s all over the kernel.
Note that the is_visible callback takes an index into the array as
argument, so that indices of the driver's attributes must not change,
this is not a problem as the driver's own attributes are added first
to the newly allocated attrs array and the attributes handled by the
core are appended after the driver's attributes.
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Alexandru Ardelean <[email protected]>
Cc: Michael Hennerich <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions