From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Thu, 21 Mar 2013 11:38:40 +0200 Subject: [U-Boot] [PATCH v2 1/2] omap_hsmmc: Check wp and cd GPIO for valid GPIO first In-Reply-To: <514ABFD4.3080809@compulab.co.il> References: <1363805196-11408-1-git-send-email-trini@ti.com> <514ABFD4.3080809@compulab.co.il> Message-ID: <514AD520.8010300@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > [...] > + 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 -- Regards, Nikita.