Currently, mmc_fdt_gpio_get_{present,readonly} return all time true.
true ^ 100b = true
false ^ 100b = true
since that's done after promotion to integers. Use !! to convert
the bit to a bool before xor.
Reviewed by: imp@ (converted to (bool) to !! for portability)
Pull Request: https://github.com/freebsd/freebsd-src/pull/461
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
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