mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
iio: adc: mt6577_auxadc: Fix kernel panic on suspend
Commita2d518fbe3("iio: adc: mt6577_auxadc: Simplify with device managed function") simplified the driver with devm hooks, but wrongly states that the platform_set_drvdata(), platform_get_drvdata() are unused after the simplification: the driver data is infact used in .suspend() and .resume() PM callbacks, currently producing a kernel panic. Reintroduce the call to platform_set_drvdata() in the probe function Fixes:a2d518fbe3("iio: adc: mt6577_auxadc: Simplify with device managed function") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://lore.kernel.org/r/20231010121940.159696-1-angelogioacchino.delregno@collabora.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
db7fe1f610
commit
6eb14ffa18
|
|
@ -293,6 +293,7 @@ static int mt6577_auxadc_probe(struct platform_device *pdev)
|
|||
mt6577_auxadc_mod_reg(adc_dev->reg_base + MT6577_AUXADC_MISC,
|
||||
MT6577_AUXADC_PDN_EN, 0);
|
||||
mdelay(MT6577_AUXADC_POWER_READY_MS);
|
||||
platform_set_drvdata(pdev, indio_dev);
|
||||
|
||||
ret = devm_add_action_or_reset(&pdev->dev, mt6577_power_off, adc_dev);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user