summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 17:47:15 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-03-22 19:02:17 +0300
commit57150c40b6391bc350c6016641b2a487a3de3cba (patch)
treec903efd337f06e4d99d835fb126c7e5ff8fd4275 /drivers/mtd/spi-nor
parent75f32f4b9d5263829d1d13f990000db929140559 (diff)
downloadlinux-57150c40b6391bc350c6016641b2a487a3de3cba.tar.xz
mtd: Use of_property_read_bool() for boolean properties
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230310144716.1543995-1-robh@kernel.org
Diffstat (limited to 'drivers/mtd/spi-nor')
-rw-r--r--drivers/mtd/spi-nor/controllers/nxp-spifi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/controllers/nxp-spifi.c b/drivers/mtd/spi-nor/controllers/nxp-spifi.c
index ab3990e6ac25..794c7b7d5c92 100644
--- a/drivers/mtd/spi-nor/controllers/nxp-spifi.c
+++ b/drivers/mtd/spi-nor/controllers/nxp-spifi.c
@@ -305,10 +305,10 @@ static int nxp_spifi_setup_flash(struct nxp_spifi *spifi,
}
}
- if (of_find_property(np, "spi-cpha", NULL))
+ if (of_property_read_bool(np, "spi-cpha"))
mode |= SPI_CPHA;
- if (of_find_property(np, "spi-cpol", NULL))
+ if (of_property_read_bool(np, "spi-cpol"))
mode |= SPI_CPOL;
/* Setup control register defaults */