From: Khouloud Touil <ktouil@baylibre.com>
To: srinivas.kandagatla@linaro.org, bgolaszewski@baylibre.com
Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org,
geert@linux-m68k.org, baylibre-upstreaming@groups.io,
Khouloud Touil <ktouil@baylibre.com>
Subject: [PATCH] nvmem: release the write-protect pin
Date: Mon, 17 Feb 2020 14:52:45 +0100 [thread overview]
Message-ID: <20200217135245.29195-1-ktouil@baylibre.com> (raw)
Implement the auto-release of the write-protect pin that when the
registration fails, it's auto-released.
Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin")
Reported-by: geert@linux-m68k.org
Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
---
drivers/nvmem/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index ef326f243f36..5f1988498d75 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -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);
}
--
2.17.1
reply other threads:[~2020-02-17 13:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200217135245.29195-1-ktouil@baylibre.com \
--to=ktouil@baylibre.com \
--cc=baylibre-upstreaming@groups.io \
--cc=bgolaszewski@baylibre.com \
--cc=geert@linux-m68k.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®