Revert "nvmem: core: Fix a conflict between MTD and NVMEM on wp-gpios property"

This reverts commit fcd3f5906d as it
breaks the KABI.  It will be reverted the next KABI gate in a week.

Fixes: 8993e6067f ("Linux 5.15.26")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iad96cec484a8ebeea28a00fac951d3d60e782ca1
This commit is contained in:
Greg Kroah-Hartman 2022-03-16 12:40:25 +01:00
parent 407543a2ff
commit 165953b352
2 changed files with 2 additions and 4 deletions

View File

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

View File

@ -66,8 +66,7 @@ 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.
* @wp-gpio: Write protect pin
*
* Note: A default "nvmem<id>" name will be assigned to the device if
* no name is specified in its configuration. In such case "<id>" is
@ -89,7 +88,6 @@ struct nvmem_config {
enum nvmem_type type;
bool read_only;
bool root_only;
bool ignore_wp;
struct device_node *of_node;
bool no_of_node;
nvmem_reg_read_t reg_read;