[PATCH 1/2] iio: Update iio_channel_get API to use consumer device pointer as argument

Jonathan Cameron jic23 at kernel.org
Thu Feb 7 06:30:17 EST 2013


On 02/04/2013 11:57 PM, Chanwoo Choi wrote:
> On 02/05/2013 05:26 AM, Guenter Roeck wrote:
>> For iio_channel_get to work with OF based configurations, it needs the
>> consumer device pointer instead of the consumer device name as argument.
>>
>> Signed-off-by: Guenter Roeck <linux at roeck-us.net>
Applied to togreg branch of iio.git.

Thanks all.

I'll hold off on taking the actual device tree patch (2 of this series)
for a day or two to give more time for comments on that.
>> ---
>>   drivers/extcon/extcon-adc-jack.c    |    3 +--
>>   drivers/iio/inkern.c                |   11 ++++++++++-
>>   drivers/power/generic-adc-battery.c |    4 ++--
>>   drivers/power/lp8788-charger.c      |    8 ++++----
>>   include/linux/iio/consumer.h        |    5 +++--
>>   5 files changed, 20 insertions(+), 11 deletions(-)
>>
>> diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
>> index eda2a1a..d0233cd 100644
>> --- a/drivers/extcon/extcon-adc-jack.c
>> +++ b/drivers/extcon/extcon-adc-jack.c
>> @@ -135,8 +135,7 @@ static int adc_jack_probe(struct platform_device *pdev)
>>           ;
>>       data->num_conditions = i;
>>   -    data->chan = iio_channel_get(dev_name(&pdev->dev),
>> -            pdata->consumer_channel);
>> +    data->chan = iio_channel_get(&pdev->dev, pdata->consumer_channel);
>>       if (IS_ERR(data->chan)) {
>>           err = PTR_ERR(data->chan);
>>           goto out;
>> diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
>> index c42aba6..b289915 100644
>> --- a/drivers/iio/inkern.c
>> +++ b/drivers/iio/inkern.c
>> @@ -93,7 +93,8 @@ static const struct iio_chan_spec
> Ack for drivers/extcon .
> 
> Acked-by: Chanwoo Choi <cw00.choi at samsung.com>
> 
> Thanks,
> Chanwoo Choi
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


More information about the devicetree-discuss mailing list