Skip to content

Commit 569653f

Browse files
Russell King (Oracle)gregkh
authored andcommitted
nvmem: core: remove nvmem_config wp_gpio
No one provides wp_gpio, so let's remove it to avoid issues with the nvmem core putting this gpio. Cc: [email protected] Signed-off-by: Russell King (Oracle) <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 3bd747c commit 569653f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

drivers/nvmem/core.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,9 +772,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)
772772

773773
nvmem->id = rval;
774774

775-
if (config->wp_gpio)
776-
nvmem->wp_gpio = config->wp_gpio;
777-
else if (!config->ignore_wp)
775+
if (!config->ignore_wp)
778776
nvmem->wp_gpio = gpiod_get_optional(config->dev, "wp",
779777
GPIOD_OUT_HIGH);
780778
if (IS_ERR(nvmem->wp_gpio)) {

include/linux/nvmem-provider.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ struct nvmem_keepout {
7070
* @word_size: Minimum read/write access granularity.
7171
* @stride: Minimum read/write access stride.
7272
* @priv: User context passed to read/write callbacks.
73-
* @wp-gpio: Write protect pin
7473
* @ignore_wp: Write Protect pin is managed by the provider.
7574
*
7675
* Note: A default "nvmem<id>" name will be assigned to the device if
@@ -85,7 +84,6 @@ struct nvmem_config {
8584
const char *name;
8685
int id;
8786
struct module *owner;
88-
struct gpio_desc *wp_gpio;
8987
const struct nvmem_cell_info *cells;
9088
int ncells;
9189
const struct nvmem_keepout *keepout;

0 commit comments

Comments
 (0)