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 |
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to