public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] omap_hsmmc: Check wp and cd GPIO for -1
Date: Wed, 20 Mar 2013 14:41:37 -0400	[thread overview]
Message-ID: <20130320184137.GL25919@bill-the-cat> (raw)
In-Reply-To: <CAOMZO5DDU_AxyD4M+k6b0V59yqrNWe=zg08a7M9HLpYD90v3Pg@mail.gmail.com>

On Wed, Mar 20, 2013 at 03:37:10PM -0300, Fabio Estevam wrote:
> On Wed, Mar 20, 2013 at 3:32 PM, Tom Rini <trini@ti.com> wrote:
> 
> >         int cd_gpio = ((struct omap_hsmmc_data *)mmc->priv)->cd_gpio;
> > -       return gpio_get_value(cd_gpio);
> > +
> > +       if (cd_gpio >= 0)
> 
> What about using gpio_is_valid(cd_gpio) ?

OK, good point.

> > +               return gpio_get_value(cd_gpio);
> > +       else
> > +               return -1;
> 
> What about -EINVAL?

Not consistent with the rest of the driver, so I'll do that in a 2/2.
Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130320/fc3bc287/attachment.pgp>

      reply	other threads:[~2013-03-20 18:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20 18:32 [U-Boot] [PATCH] omap_hsmmc: Check wp and cd GPIO for -1 Tom Rini
2013-03-20 18:37 ` Fabio Estevam
2013-03-20 18:41   ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130320184137.GL25919@bill-the-cat \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox