nvmem: core: remove nvmem_config wp_gpio

commit 569653f022 upstream.

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

Cc: stable@vger.kernel.org
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230127104015.23839-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Russell King (Oracle) 2023-01-27 10:40:09 +00:00 committed by Greg Kroah-Hartman
parent 28829e5f1c
commit 1e2a745a89
2 changed files with 1 additions and 5 deletions

View File

@ -772,9 +772,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
nvmem->id = rval; nvmem->id = rval;
if (config->wp_gpio) if (!config->ignore_wp)
nvmem->wp_gpio = config->wp_gpio;
else if (!config->ignore_wp)
nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp", nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
GPIOD_OUT_HIGH); GPIOD_OUT_HIGH);
if (IS_ERR(nvmem->wp_gpio)) { if (IS_ERR(nvmem->wp_gpio)) {

View File

@ -70,7 +70,6 @@ struct nvmem_keepout {
* @word_size: Minimum read/write access granularity. * @word_size: Minimum read/write access granularity.
* @stride: Minimum read/write access stride. * @stride: Minimum read/write access stride.
* @priv: User context passed to read/write callbacks. * @priv: User context passed to read/write callbacks.
* @wp-gpio: Write protect pin
* @ignore_wp: Write Protect pin is managed by the provider. * @ignore_wp: Write Protect pin is managed by the provider.
* *
* Note: A default "nvmem<id>" name will be assigned to the device if * Note: A default "nvmem<id>" name will be assigned to the device if
@ -85,7 +84,6 @@ struct nvmem_config {
const char *name; const char *name;
int id; int id;
struct module *owner; struct module *owner;
struct gpio_desc *wp_gpio;
const struct nvmem_cell_info *cells; const struct nvmem_cell_info *cells;
int ncells; int ncells;
const struct nvmem_keepout *keepout; const struct nvmem_keepout *keepout;