mtd: m25p80: assign default read command

In the following commit (in -next):

    commit 8552b439ab
    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>
This commit is contained in:
Brian Norris 2013-12-04 22:59:40 -08:00
parent 973b88fbfa
commit 99ed1a1675
1 changed files with 2 additions and 0 deletions

View File

@ -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;