]> git.baikalelectronics.ru Git - kernel.git/commit
staging: iio: amend macros for SCAN_EL creation to add separate index attr
authorJonathan Cameron <jic23@cam.ac.uk>
Tue, 21 Sep 2010 13:40:57 +0000 (14:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Sep 2010 17:34:41 +0000 (10:34 -0700)
commitbfd29b58a5b4e0d34328c26dfee3ab1db4cb9267
treec6725516134adc603f7e6b472ea7e60c42d7a2a0
parent859fb2f9266f207000536f15e5c89d2c39e5e396
staging: iio: amend macros for SCAN_EL creation to add separate index attr

As Manuel Stahl observed, putting data into the naming of an attribute
(beyond what it is for) breaks the one value per attribute rule (in spirit
at least).  Hence we introduce a separate _index attribute for each scan
element to tell userspace the ordering in output from the buffer.

This will generate a lot of sparse warnings as all drivers will have unused
iio_const_attrs created.  The rest of the set will clean these up.

The final patch will remove the old indexing method. It is not here so
as to maintain one or other interface for all devices as this set
progresses.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/ring_generic.h