aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2013-12-05 01:59:40 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-01-20 14:49:48 -0500
commit99ed1a167578f85963a0cdf5fd7b2291eaecc400 (patch)
tree5c9e9b650902792f7a9052c20803d0a4d7ec4ba8 /drivers/mtd
parent973b88fbfa265788f01e65c8667604bf582d5961 (diff)
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>
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 19632e330d36..d0f6475504f5 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)
1204 /* If we were instantiated by DT, use it */ 1204 /* If we were instantiated by DT, use it */
1205 if (of_property_read_bool(np, "m25p,fast-read")) 1205 if (of_property_read_bool(np, "m25p,fast-read"))
1206 flash->flash_read = M25P80_FAST; 1206 flash->flash_read = M25P80_FAST;
1207 else
1208 flash->flash_read = M25P80_NORMAL;
1207 } else { 1209 } else {
1208 /* If we weren't instantiated by DT, default to fast-read */ 1210 /* If we weren't instantiated by DT, default to fast-read */
1209 flash->flash_read = M25P80_FAST; 1211 flash->flash_read = M25P80_FAST;