Skip to content

Commit

Permalink
nvmem: core: remove nvmem_config wp_gpio
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  • Loading branch information
Russell King (Oracle) authored and Srinivas Kandagatla committed Jan 3, 2023
1 parent 6d6afa7 commit ad4fcae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions drivers/nvmem/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
2 changes: 0 additions & 2 deletions include/linux/nvmem-provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit ad4fcae

Please sign in to comment.