Commit 6eb14ffa authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Jonathan Cameron
Browse files

iio: adc: mt6577_auxadc: Fix kernel panic on suspend



Commit a2d518fb ("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: a2d518fb ("iio: adc: mt6577_auxadc: Simplify with device managed function")
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarMarkus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: default avatarAlexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20231010121940.159696-1-angelogioacchino.delregno@collabora.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent db7fe1f6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment