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-s3c.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-s3c.c')
-rw-r--r-- | drivers/mmc/host/sdhci-s3c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 9085f3932443..504015e84308 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -437,12 +437,12 @@ static int sdhci_s3c_parse_dt(struct device *dev, pdata->max_width = max_width; /* get the card detection method */ - if (of_get_property(node, "broken-cd", NULL)) { + if (of_property_read_bool(node, "broken-cd")) { pdata->cd_type = S3C_SDHCI_CD_NONE; return 0; } - if (of_get_property(node, "non-removable", NULL)) { + if (of_property_read_bool(node, "non-removable")) { pdata->cd_type = S3C_SDHCI_CD_PERMANENT; return 0; } |