[PATCH v3 03/13] mmc: provide a standard MMC device-tree binding parser centrally
Markus Pargmann
mpa at pengutronix.de
Sun Feb 10 00:37:51 EST 2013
On Wed, Feb 06, 2013 at 08:46:50PM +0100, Guennadi Liakhovetski wrote:
> + /* Parse Card Detection */
> + if (of_find_property(np, "non-removable", &len)) {
> + host->caps |= MMC_CAP_NONREMOVABLE;
> + } else {
> + bool explicit_inv_cd, gpio_inv_cd = false;
> +
> + explicit_inv_cd = !!of_find_property(np, "cd-inverted", &len);
You could use of_property_read_bool here
> + /* Parse Write Protection */
> + explicit_inv_wp = !!of_find_property(np, "wp-inverted", &len);
and here.
Markus
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the devicetree-discuss
mailing list