kernel: update m25p80 in 4.1 to the latest version from 4.4-rc1
[openwrt/openwrt.git] / target / linux / lantiq / patches-4.1 / 0022-MTD-m25p80-allow-loading-mtd-name-from-OF.patch
index 1f0ffe1bcfdfd1338fcd86495c6c42b017163e8f..535069c58dbe3bf49cf19acfd13229f5cecb9ce1 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
-@@ -184,6 +185,10 @@ static int m25p_probe(struct spi_device
+@@ -182,6 +183,10 @@ static int m25p_probe(struct spi_device
        enum read_mode mode = SPI_NOR_NORMAL;
        char *flash_name = NULL;
        int ret;
@@ -33,10 +33,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
        data = dev_get_platdata(&spi->dev);
  
-@@ -215,6 +220,8 @@ static int m25p_probe(struct spi_device
+@@ -212,6 +217,8 @@ static int m25p_probe(struct spi_device
  
        if (data && data->name)
-               flash->mtd.name = data->name;
+               nor->mtd.name = data->name;
 +      else if (of_mtd_name)
 +              flash->mtd.name = of_mtd_name;