summaryrefslogtreecommitdiff
path: root/drivers/power/generic-adc-battery.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-02-05 00:26:00 +0400
committerJonathan Cameron <jic23@kernel.org>2013-02-06 23:23:52 +0400
commit5aa57f0a655276f62683c0cc714cd6328d98e08a (patch)
treedf06afdc9f598c3da0671a296d2319191e46be2b /drivers/power/generic-adc-battery.c
parent860c9c54272deaab43b40dbe416becb34abd344f (diff)
downloadlinux-5aa57f0a655276f62683c0cc714cd6328d98e08a.tar.xz
iio: Update iio_channel_get API to use consumer device pointer as argument
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@roeck-us.net> Acked-by: Anton Vorontsov <anton@enomsg.org> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/power/generic-adc-battery.c')
-rw-r--r--drivers/power/generic-adc-battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
index 32ce17e235c0..42733c4dcb0e 100644
--- a/drivers/power/generic-adc-battery.c
+++ b/drivers/power/generic-adc-battery.c
@@ -287,8 +287,8 @@ static int gab_probe(struct platform_device *pdev)
* based on the channel supported by consumer device.
*/
for (chan = 0; chan < ARRAY_SIZE(gab_chan_name); chan++) {
- adc_bat->channel[chan] = iio_channel_get(dev_name(&pdev->dev),
- gab_chan_name[chan]);
+ adc_bat->channel[chan] = iio_channel_get(&pdev->dev,
+ gab_chan_name[chan]);
if (IS_ERR(adc_bat->channel[chan])) {
ret = PTR_ERR(adc_bat->channel[chan]);
} else {