Skip to content

Commit

Permalink
Merge tag 'fixes-for-5.3-rc5' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
torvalds committed Aug 18, 2019
2 parents 3039fad + 834de5c commit 6825e5a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/mtd/spi-nor/spi-nor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 6825e5a

Please sign in to comment.