}
}
-static void lp8788_setup_adc_channel(struct lp8788_charger *pchg)
+static void lp8788_setup_adc_channel(const char *consumer_name,
+ struct lp8788_charger *pchg)
{
struct lp8788_charger_platform_data *pdata = pchg->pdata;
struct device *dev = pchg->lp->dev;
case LPADC_VBATT_5P5:
case LPADC_VBATT_6P0:
case LPADC_VBATT_5P0:
- chan = iio_channel_get(NULL, chan_name[id]);
+ chan = iio_channel_get(consumer_name, chan_name[id]);
pchg->chan[LP8788_VBATT] = IS_ERR(chan) ? NULL : chan;
break;
default:
case LPADC_ADC2:
case LPADC_ADC3:
case LPADC_ADC4:
- chan = iio_channel_get(NULL, chan_name[id]);
+ chan = iio_channel_get(consumer_name, chan_name[id]);
pchg->chan[LP8788_BATT_TEMP] = IS_ERR(chan) ? NULL : chan;
break;
default:
if (ret)
return ret;
- lp8788_setup_adc_channel(pchg);
+ lp8788_setup_adc_channel(pdev->name, pchg);
ret = lp8788_psy_register(pdev, pchg);
if (ret)