Merge tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD fix from Richard Weinberger: "A single fix for MTD to correctly set the spi-nor WP pin" * tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: spi-nor: Fix the disabling of write protection at init
This commit is contained in:
@@ -3780,8 +3780,6 @@ static int spi_nor_init_params(struct spi_nor *nor,
|
||||
default:
|
||||
/* Kept only for backward compatibility purpose. */
|
||||
params->quad_enable = spansion_quad_enable;
|
||||
if (nor->clear_sr_bp)
|
||||
nor->clear_sr_bp = spi_nor_spansion_clear_sr_bp;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -4035,6 +4033,9 @@ static int spi_nor_init(struct spi_nor *nor)
|
||||
int err;
|
||||
|
||||
if (nor->clear_sr_bp) {
|
||||
if (nor->quad_enable == spansion_quad_enable)
|
||||
nor->clear_sr_bp = spi_nor_spansion_clear_sr_bp;
|
||||
|
||||
err = nor->clear_sr_bp(nor);
|
||||
if (err) {
|
||||
dev_err(nor->dev,
|
||||
|
||||
Reference in New Issue
Block a user