Revert "Revert "nvmem: core: remove nvmem_config wp_gpio""

This reverts commit f977f92131.

It needs to come back to handle the 5.15.94 merge properly, it will be
reverted again afterward to resolve the abi issues.

Bug: 161946584
Change-Id: I8ff6a57edb206a515edd856341e0a916cc4d9c08
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2023-03-03 13:00:58 +00:00
parent 5448b2fda8
commit 68c4041c2b
2 changed files with 1 additions and 5 deletions

View File

@@ -768,9 +768,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)) {

View File

@@ -66,7 +66,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
@@ -81,7 +80,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;