Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db884bc2 authored by Jishnu Prakash's avatar Jishnu Prakash Committed by Gerrit - the friendly Code Review server
Browse files

thermal: adc_tm: Ensure drvdata is set for all adc_tm instances



For adc_tm instances of type iio, drvdata is not set before
exiting probe, which may lead to issues when dev_pm_ops are
used. Set drvdata for these adc_tm instances too.

Change-Id: If78162455abf44d3071a8816582262d776a12318
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent fb50b6d0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -350,6 +350,8 @@ static int adc_tm_probe(struct platform_device *pdev)
	adc_tm->base = reg;
	adc_tm->dt_channels = dt_chan_num;

	platform_set_drvdata(pdev, adc_tm);

	revid_dev_node = of_parse_phandle(node, "qcom,pmic-revid", 0);
	if (revid_dev_node) {
		adc_tm->pmic_rev_id = get_revid_data(revid_dev_node);
@@ -393,7 +395,6 @@ static int adc_tm_probe(struct platform_device *pdev)
	}

	list_add_tail(&adc_tm->list, &adc_tm_device_list);
	platform_set_drvdata(pdev, adc_tm);
	return 0;
fail:
	i = 0;