Skip to content
Commit 6bea4f03 authored by Paul Geurts's avatar Paul Geurts Committed by Jakub Kicinski
Browse files

NFC: trf7970a: disable all regulators on removal

During module probe, regulator 'vin' and 'vdd-io' are used and enabled,
but the vdd-io regulator overwrites the 'vin' regulator pointer. During
remove, only the vdd-io is disabled, as the vin regulator pointer is not
available anymore. When regulator_put() is called during resource
cleanup a kernel warning is given, as the regulator is still enabled.

Store the two regulators in separate pointers and disable both the
regulators on module remove.

Fixes: 49d22c70

 ("NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage")
Signed-off-by: default avatarPaul Geurts <paul_geurts@live.nl>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/DB7PR09MB26847A4EBF88D9EDFEB1DA0F950E2@DB7PR09MB2684.eurprd09.prod.outlook.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 97ec32b5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment