public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Gaosheng Cui <cuigaosheng1@huawei.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
	Hector Martin <marcan@marcan.st>
Subject: [PATCH v3 3/5] nvmem: core: remove nvmem_config wp_gpio Bartosz Golaszewski <bgolaszewski@baylibre.com>,Gaosheng Cui <cuigaosheng1@huawei.com>,Greg Kroah-Hartman <gregkh@linuxfoundation.org>,linux-arm-kernel@lists.infradead.org,linux-kernel@vger.kernel.org,Maxime Ripard <mripard@kernel.org>, Hector Martin <marcan@marcan.st>
Date: Tue, 03 Jan 2023 16:59:27 +0000	[thread overview]
Message-ID: <E1pCkdL-004huw-4D@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Y7RezbPSGrO37NZZ@shell.armlinux.org.uk>

No one provides wp_gpio, so let's remove it to avoid issues with
the nvmem core putting this gpio.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/nvmem/core.c           | 4 +---
 include/linux/nvmem-provider.h | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index c1a40d9c3825..843e2f5696e6 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -772,9 +772,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
 
 	nvmem->id = rval;
 
-	if (config->wp_gpio)
-		nvmem->wp_gpio = config->wp_gpio;
-	else if (!config->ignore_wp)
+	if (!config->ignore_wp)
 		nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
 						    GPIOD_OUT_HIGH);
 	if (IS_ERR(nvmem->wp_gpio)) {
diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h
index 50caa117cb62..bb15c9234e21 100644
--- a/include/linux/nvmem-provider.h
+++ b/include/linux/nvmem-provider.h
@@ -70,7 +70,6 @@ struct nvmem_keepout {
  * @word_size:	Minimum read/write access granularity.
  * @stride:	Minimum read/write access stride.
  * @priv:	User context passed to read/write callbacks.
- * @wp-gpio:	Write protect pin
  * @ignore_wp:  Write Protect pin is managed by the provider.
  *
  * Note: A default "nvmem<id>" name will be assigned to the device if
@@ -85,7 +84,6 @@ struct nvmem_config {
 	const char		*name;
 	int			id;
 	struct module		*owner;
-	struct gpio_desc	*wp_gpio;
 	const struct nvmem_cell_info	*cells;
 	int			ncells;
 	const struct nvmem_keepout *keepout;
-- 
2.30.2


  parent reply	other threads:[~2023-01-03 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 16:58 [PATCH v3 0/5] Fix a whole host of nvmem registration/cleanup issues Russell King (Oracle)
2023-01-03 16:59 ` [PATCH v3 1/5] nvmem: core: remove spurious white space Bartosz Golaszewski <bgolaszewski@baylibre.com>,Gaosheng Cui <cuigaosheng1@huawei.com>,Greg Kroah-Hartman <gregkh@linuxfoundation.org>,linux-arm-kernel@lists.infradead.org,linux-kernel@vger.kernel.org,Maxime Ripard <mripard@kernel.org>, Hector Martin <marcan@marcan.st> Russell King (Oracle)
2023-01-03 16:59 ` [PATCH v3 2/5] nvmem: core: initialise nvmem->id early " Russell King (Oracle)
2023-01-03 16:59 ` Russell King (Oracle) [this message]
2023-01-03 16:59 ` [PATCH v3 4/5] nvmem: core: fix cleanup after dev_set_name() " Russell King (Oracle)
2023-01-05  4:23   ` [PATCH v3 4/5] nvmem: core: fix cleanup after dev_set_name() Dan Carpenter
2023-01-03 16:59 ` [PATCH v3 5/5] nvmem: core: fix registration vs use race Bartosz Golaszewski <bgolaszewski@baylibre.com>,Gaosheng Cui <cuigaosheng1@huawei.com>,Greg Kroah-Hartman <gregkh@linuxfoundation.org>,linux-arm-kernel@lists.infradead.org,linux-kernel@vger.kernel.org,Maxime Ripard <mripard@kernel.org>, Hector Martin <marcan@marcan.st> Russell King (Oracle)
2023-01-03 18:12 ` [PATCH v3 0/5] Fix a whole host of nvmem registration/cleanup issues Hector Martin
2023-01-03 20:56   ` Russell King (Oracle)
2023-01-10 16:25     ` Russell King (Oracle)
2023-01-13 11:55       ` Hector Martin
2023-01-03 21:15 ` Srinivas Kandagatla
2023-01-04  1:15   ` Hector Martin
2023-01-04 10:29     ` Russell King (Oracle)

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=E1pCkdL-004huw-4D@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@armlinux.org.uk \
    --cc=bgolaszewski@baylibre.com \
    --cc=cuigaosheng1@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=mripard@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