aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mmc
diff options
context:
space:
mode:
authorPriit Trees <trees@neti.ee>2021-03-31 20:15:31 +0000
committerWarner Losh <imp@FreeBSD.org>2021-06-03 03:58:30 +0000
commitcfae21201a2b28b4146a09923ed142af7b86cdec (patch)
treeeaf901d5d192318e3915f093339b856a0b5e9629 /sys/dev/mmc
parent43521b46fc788096648dfa89650dfe394dc0d455 (diff)
Diffstat (limited to 'sys/dev/mmc')
-rw-r--r--sys/dev/mmc/mmc_fdt_helpers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c
index 4e8a1730d240..9d120fa01a26 100644
--- a/sys/dev/mmc/mmc_fdt_helpers.c
+++ b/sys/dev/mmc/mmc_fdt_helpers.c
@@ -407,7 +407,7 @@ mmc_fdt_gpio_get_present(struct mmc_fdt_helper *helper)
gpio_pin_is_active(helper->cd_pin, &pinstate);
- return (pinstate ^ (helper->props & MMC_PROP_CD_INVERTED));
+ return (pinstate ^ !!(helper->props & MMC_PROP_CD_INVERTED));
}
bool
@@ -423,7 +423,7 @@ mmc_fdt_gpio_get_readonly(struct mmc_fdt_helper *helper)
gpio_pin_is_active(helper->wp_pin, &pinstate);
- return (pinstate ^ (helper->props & MMC_PROP_WP_INVERTED));
+ return (pinstate ^ !!(helper->props & MMC_PROP_WP_INVERTED));
}
void