[U-Boot] [PATCH v2 1/2] omap_hsmmc: Check wp and cd GPIO for valid GPIO first

Nikita Kiryanov nikita at compulab.co.il
Thu Mar 21 10:38:40 CET 2013


Hi Tom,
a few style comments:

On 03/20/2013 08:46 PM, Tom Rini wrote:
> When we cannot check write protect or card change via GPIO (and have
> been passed -1 in omap_mmc_init), only even try the gpio_is_valid is
> true.

That last part needs rephrasing: "only try if gpio_is_valid() is true".

> This prevents invalid GPIO messages from being seen on the
> console when doing MMC operations
>
> Signed-off-by: Tom Rini <trini at ti.com>
>

[...]

> +    if (gpio_is_valid(cd_gpio))
> +        return gpio_get_value(cd_gpio);
> +    else
> +        return -1;

Also, the "else" word is not necessary (in both checks).

Aside from that,
Acked-by: Nikita Kiryanov <nikita at compulab.co.il>

-- 
Regards,
Nikita.


More information about the U-Boot mailing list