On 06/05/2013 06:24 PM, Sebastian Andrzej Siewior wrote:
[...]
> -     return indio_dev->num_channels;
> +     adc_dev->map = kcalloc(channels + 1, sizeof(struct iio_map),
> +                     GFP_KERNEL);
> +     if (adc_dev->map == NULL)
> +             goto err_free_chan;
> +
> +     for (i = 0; i < channels; i++) {
> +             adc_dev->map[i].adc_channel_label =
> +                     chan_array[i].datasheet_name;
> +             adc_dev->map[i].consumer_dev_name = "any";
> +             adc_dev->map[i].consumer_channel = chan_array[i].datasheet_name;
> +     }

This is not the way the IIO map interface is supposed to be used and I doubt it
will actually work at all. The map either needs to be provided by board code
with the proper consumer device and channel name filled in or in your case
where you use devicetree you don't need to provide a map at all since this will
all be handled by the generic IIO devicetree bindings. So I'd just drop this 
patch.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to