summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi-nor
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-12-06 11:41:19 +0100
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-12-10 21:59:08 +0100
commiteb6ec1d79b40badeecea4194547ebd90dc560d5e (patch)
tree37102129bb7e1da603b426f0cbb281a572501cd4 /drivers/mtd/spi-nor
parentb296379fef7ce9f96129798825ab04683414313b (diff)
downloadlinux-eb6ec1d79b40badeecea4194547ebd90dc560d5e.tar.bz2
mtd: spi-nor: Make the enable argument passed to set_byte() a bool
No need to use an integer when the value is either true or false. Make it a boolean. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Diffstat (limited to 'drivers/mtd/spi-nor')
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index a2395000e720..f6beb0ee15b0 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -466,7 +466,7 @@ static void spi_nor_set_4byte_opcodes(struct spi_nor *nor)
}
/* Enable/disable 4-byte addressing mode. */
-static int set_4byte(struct spi_nor *nor, int enable)
+static int set_4byte(struct spi_nor *nor, bool enable)
{
int status;
bool need_wren = false;
@@ -3726,7 +3726,7 @@ static int spi_nor_init(struct spi_nor *nor)
*/
WARN_ONCE(nor->flags & SNOR_F_BROKEN_RESET,
"enabling reset hack; may not recover from unexpected reboots\n");
- set_4byte(nor, 1);
+ set_4byte(nor, true);
}
return 0;
@@ -3750,7 +3750,7 @@ void spi_nor_restore(struct spi_nor *nor)
/* restore the addressing mode */
if (nor->addr_width == 4 && !(nor->flags & SNOR_F_4B_OPCODES) &&
nor->flags & SNOR_F_BROKEN_RESET)
- set_4byte(nor, 0);
+ set_4byte(nor, false);
}
EXPORT_SYMBOL_GPL(spi_nor_restore);