aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/lp8788-charger.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/lp8788-charger.c')
-rw-r--r--drivers/power/lp8788-charger.c8
1 files changed, 4 insertions, 4 deletions
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)