From 57150c40b6391bc350c6016641b2a487a3de3cba Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 10 Mar 2023 08:47:15 -0600 Subject: mtd: Use of_property_read_bool() for boolean properties It is preferred to use typed property access functions (i.e. of_property_read_ 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 Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230310144716.1543995-1-robh@kernel.org --- drivers/mtd/spi-nor/controllers/nxp-spifi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/mtd/spi-nor') 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 */ -- cgit v1.2.3