summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-12-05 06:59:40 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:37:18 (GMT)
commitca745cb7626ae974806ea706ad786b832e4de7fa (patch)
treeb30ec4a2e5cb9208ba42f01f86d04c80327a446a /drivers/mtd
parent0254eeaf58dde672d4bb667859de87ea02c0d703 (diff)
downloadlinux-fsl-qoriq-ca745cb7626ae974806ea706ad786b832e4de7fa.tar.xz
mtd: m25p80: assign default read command
In the following commit (in -next): commit 8552b439aba7f32063755d23f79ca27b4d0a3115 drivers: mtd: m25p80: convert "bool" read check into an enum We converted the boolean 'fast_read' property to become an enum 'flash_read', but at the same time, we changed the conditional path so that it doesn't choose a default value in some cases (technically, we choose the correct default simply by virtue of devm_kzalloc(), which zeroes this out to be a NORMAL read operation, but still...). Fix this by setting a default for the 'else' clause. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Sourav Poddar <sourav.poddar@ti.com> Acked-by: Marek Vasut <marex@denx.de> (cherry picked from commit 99ed1a167578f85963a0cdf5fd7b2291eaecc400) Change-Id: Ic0d5d184ad7cf702a6027271a2a5388b37a1a0ca Reviewed-on: http://git.am.freescale.net:8181/20044 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/m25p80.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 19632e3..d0f6475 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -1204,6 +1204,8 @@ static int m25p_probe(struct spi_device *spi)
/* If we were instantiated by DT, use it */
if (of_property_read_bool(np, "m25p,fast-read"))
flash->flash_read = M25P80_FAST;
+ else
+ flash->flash_read = M25P80_NORMAL;
} else {
/* If we weren't instantiated by DT, default to fast-read */
flash->flash_read = M25P80_FAST;