Skip to contentSkip to conversation

patch "nvmem: release the write-protect pin" added to char-misc-next

PATCH [email protected] 1 participant 1 message Mar 19, 2020

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

nvmem: release the write-protect pin

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release during the merge window.

If you have any questions about this process, please let me know.

From a9c3766cb19cdadf2776aba41b64470002645894 Mon Sep 17 00:00:00 2001
From: Khouloud Touil <[email protected]>
Date: Tue, 10 Mar 2020 13:22:50 +0000
Subject: nvmem: release the write-protect pin

Put the write-protect GPIO descriptor in nvmem_release() so that it can be automatically released when the associated device's reference count drops to 0.

Fixes 2a127da461a9 ("nvmem: add support for the write-protect pin")
Cc stable <[email protected]>
[Bartosz: tweak the commit message]
---
 drivers/nvmem/core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvmem/core.c +1 -0
index 2758d90d63b7..c05c4f4a7b9e 100644
@@ -72,6 +72,7 @@ static void nvmem_release(struct device *dev)
 	struct nvmem_device *nvmem = to_nvmem_device(dev);
 
 	ida_simple_remove(&nvmem_ida, nvmem->id);
+	gpiod_put(nvmem->wp_gpio);
 	kfree(nvmem);
 }
 
Signature · 1 line
2.25.2