linux/drivers/staging/iio/Documentation
Michael Hennerich 8b68bb2081 Staging: IIO: Documentation: iio_utils: fix channel array generation.
The previous implementation flawed, in case some channels are not enabled.
The sorted array would then include channel information of disabled channels,
And misses the enabled ones, when the count is reached.
More troublesome, the loop would not even terminate.

The fix is twofold:

First we skip channels that are not enabled.
Then we use a tested bubble sort algorithm to sort the array.
Since we already allocated exactly the number of bytes we need.
We can exercise bubble sort on the original memory.
In all cases I've seen, the array is already sorted, so this sort
terminates immediately.

Changes since V1:
Fix coding style issues.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 15:50:28 -08:00
..
dac Staging: iio: add driver for MAX517/518/519 2011-01-21 12:20:56 -08:00
device.txt
generic_buffer.c IIO: Documentation: generic_buffer example: Avoid NULL pointer dereference 2011-02-28 14:40:22 -08:00
iio_utils.h Staging: IIO: Documentation: iio_utils: fix channel array generation. 2011-03-09 15:50:28 -08:00
overview.txt staging: iio: documentation - partial update to make more of it true. 2010-09-04 21:19:02 -07:00
ring.txt staging: iio partial documentation update 2010-08-31 11:42:02 -07:00
sysfs-bus-iio Staging: IIO: DAC: AD5624R: Update to IIO ABI 2011-03-09 15:50:27 -08:00
sysfs-bus-iio-dds Staging: IIO: Direct digital synthesis abi documentation 2010-12-16 12:23:03 -08:00
sysfs-bus-iio-light staging: iio: light: Adding driver for ISL29018 ALS 2010-10-07 20:12:38 -07:00
sysfs-bus-iio-trigger-sysfs Staging: IIO: TRIGGER: New sysfs based trigger 2011-02-09 14:56:42 -08:00
trigger.txt
userspace.txt staging: iio: documentation - partial update to make more of it true. 2010-09-04 21:19:02 -07:00