aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/generic-adc-battery.c4
-rw-r--r--drivers/power/lp8788-charger.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
index 836816b82cbc..8cb5d7f67ace 100644
--- a/drivers/power/generic-adc-battery.c
+++ b/drivers/power/generic-adc-battery.c
@@ -284,8 +284,8 @@ static int gab_probe(struct platform_device *pdev)
284 * based on the channel supported by consumer device. 284 * based on the channel supported by consumer device.
285 */ 285 */
286 for (chan = 0; chan < ARRAY_SIZE(gab_chan_name); chan++) { 286 for (chan = 0; chan < ARRAY_SIZE(gab_chan_name); chan++) {
287 adc_bat->channel[chan] = iio_channel_get(dev_name(&pdev->dev), 287 adc_bat->channel[chan] = iio_channel_get(&pdev->dev,
288 gab_chan_name[chan]); 288 gab_chan_name[chan]);
289 if (IS_ERR(adc_bat->channel[chan])) { 289 if (IS_ERR(adc_bat->channel[chan])) {
290 ret = PTR_ERR(adc_bat->channel[chan]); 290 ret = PTR_ERR(adc_bat->channel[chan]);
291 adc_bat->channel[chan] = NULL; 291 adc_bat->channel[chan] = NULL;
diff --git a/drivers/power/lp8788-charger.c b/drivers/power/lp8788-charger.c
index e33d6b2a7a56..6d1f452810b8 100644
--- a/drivers/power/lp8788-charger.c
+++ b/drivers/power/lp8788-charger.c
@@ -580,7 +580,7 @@ static void lp8788_irq_unregister(struct platform_device *pdev,
580 } 580 }
581} 581}
582 582
583static void lp8788_setup_adc_channel(const char *consumer_name, 583static void lp8788_setup_adc_channel(struct device *dev,
584 struct lp8788_charger *pchg) 584 struct lp8788_charger *pchg)
585{ 585{
586 struct lp8788_charger_platform_data *pdata = pchg->pdata; 586 struct lp8788_charger_platform_data *pdata = pchg->pdata;
@@ -590,11 +590,11 @@ static void lp8788_setup_adc_channel(const char *consumer_name,
590 return; 590 return;
591 591
592 /* ADC channel for battery voltage */ 592 /* ADC channel for battery voltage */
593 chan = iio_channel_get(consumer_name, pdata->adc_vbatt); 593 chan = iio_channel_get(dev, pdata->adc_vbatt);
594 pchg->chan[LP8788_VBATT] = IS_ERR(chan) ? NULL : chan; 594 pchg->chan[LP8788_VBATT] = IS_ERR(chan) ? NULL : chan;
595 595
596 /* ADC channel for battery temperature */ 596 /* ADC channel for battery temperature */
597 chan = iio_channel_get(consumer_name, pdata->adc_batt_temp); 597 chan = iio_channel_get(dev, pdata->adc_batt_temp);
598 pchg->chan[LP8788_BATT_TEMP] = IS_ERR(chan) ? NULL : chan; 598 pchg->chan[LP8788_BATT_TEMP] = IS_ERR(chan) ? NULL : chan;
599} 599}
600 600
@@ -705,7 +705,7 @@ static int lp8788_charger_probe(struct platform_device *pdev)
705 if (ret) 705 if (ret)
706 return ret; 706 return ret;
707 707
708 lp8788_setup_adc_channel(pdev->name, pchg); 708 lp8788_setup_adc_channel(&pdev->dev, pchg);
709 709
710 ret = lp8788_psy_register(pdev, pchg); 710 ret = lp8788_psy_register(pdev, pchg);
711 if (ret) 711 if (ret)