OpenCloudOS-Kernel/drivers/nfc
Paul Geurts cffee39d36 NFC: trf7970a: disable all regulators on removal
[ Upstream commit 6bea4f03c6a4e973ef369e15aac88f37981db49e ]

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: 49d22c70aa ("NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage")
Signed-off-by: Paul Geurts <paul_geurts@live.nl>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/DB7PR09MB26847A4EBF88D9EDFEB1DA0F950E2@DB7PR09MB2684.eurprd09.prod.outlook.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-05-02 16:32:36 +02:00
..
fdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-06-22 18:40:38 -07:00
microread nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
nfcmrvl nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
nxp-nci NFC: nxp: add NXP1002 2023-08-30 18:32:24 -07:00
pn533 nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
pn544 nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
s3fwrn5 nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
st-nci nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
st21nfca nfc: Switch i2c drivers back to use .probe() 2023-05-22 11:41:57 +01:00
st95hf spi: make remove callback a void function 2022-02-09 13:00:45 +00:00
Kconfig nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
Makefile nfc: Add a virtual nci device driver 2021-01-29 18:03:33 -08:00
mei_phy.c nfc: mei_phy: constify buffer passed to mei_nfc_send() 2021-07-29 12:28:02 +01:00
mei_phy.h nfc: constify nfc_phy_ops 2021-07-25 09:21:21 +01:00
nfcsim.c nfcsim.c: Fix error checking for debugfs_create_dir 2023-05-26 12:18:35 +01:00
port100.c NFC: port100: fix use-after-free in port100_send_complete 2022-03-09 19:59:34 -08:00
trf7970a.c NFC: trf7970a: disable all regulators on removal 2024-05-02 16:32:36 +02:00
virtual_ncidev.c nfc: virtual_ncidev: Add variable to check if ndev is running 2023-12-20 17:01:59 +01:00