diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:47:14 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-03-23 11:30:20 +0100 |
commit | ca6b5fe277e91ebca5101dc00c0e26755f0ed6c4 (patch) | |
tree | d01d9d6aa85069d80500d6c9eac3738c74bbbcbe /drivers/mmc/host/sdhci-esdhc-imx.c | |
parent | dt-bindings: mmc: mediatek,mtk-sd: add mt8365 (diff) | |
download | linux-ca6b5fe277e91ebca5101dc00c0e26755f0ed6c4.tar.xz linux-ca6b5fe277e91ebca5101dc00c0e26755f0ed6c4.zip |
mmc: 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>
Link: https://lore.kernel.org/r/20230310144715.1543836-1-robh@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-esdhc-imx.c')
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 58f042fdd4f4..d7c0c0b9e26c 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1597,7 +1597,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, struct esdhc_platform_data *boarddata = &imx_data->boarddata; int ret; - if (of_get_property(np, "fsl,wp-controller", NULL)) + if (of_property_read_bool(np, "fsl,wp-controller")) boarddata->wp_type = ESDHC_WP_CONTROLLER; /* @@ -1614,7 +1614,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev, of_property_read_u32(np, "fsl,strobe-dll-delay-target", &boarddata->strobe_dll_delay_target); - if (of_find_property(np, "no-1-8-v", NULL)) + if (of_property_read_bool(np, "no-1-8-v")) host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line)) |