Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6825e5a6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 3039fadf 834de5c1
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -3780,8 +3780,6 @@ static int spi_nor_init_params(struct spi_nor *nor,
		default:
		default:
			/* Kept only for backward compatibility purpose. */
			/* Kept only for backward compatibility purpose. */
			params->quad_enable = spansion_quad_enable;
			params->quad_enable = spansion_quad_enable;
			if (nor->clear_sr_bp)
				nor->clear_sr_bp = spi_nor_spansion_clear_sr_bp;
			break;
			break;
		}
		}


@@ -4035,6 +4033,9 @@ static int spi_nor_init(struct spi_nor *nor)
	int err;
	int err;


	if (nor->clear_sr_bp) {
	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);
		err = nor->clear_sr_bp(nor);
		if (err) {
		if (err) {
			dev_err(nor->dev,
			dev_err(nor->dev,