Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Loic Poulain <loic.poulain@intel.com>
Cc: linux-wireless@vger.kernel.org, linux-gpio <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH] rfkill-gpio: Use gpio cansleep version
Date: Wed, 07 May 2014 11:04:32 +0200	[thread overview]
Message-ID: <1399453472.10517.8.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1399453340.10517.7.camel@jlt4.sipsolutions.net>

On Wed, 2014-05-07 at 11:02 +0200, Johannes Berg wrote:
> On Tue, 2014-05-06 at 18:14 +0200, Loic Poulain wrote:
> 
> > +	if (gpiod_cansleep(rfkill->shutdown_gpio))
> > +		gpiod_set_value_cansleep(rfkill->shutdown_gpio, !blocked);
> > +	else
> > +		gpiod_set_value(rfkill->shutdown_gpio, !blocked);
> > +
> > +	if (gpiod_cansleep(rfkill->reset_gpio))
> > +		gpiod_set_value_cansleep(rfkill->reset_gpio, !blocked);
> > +	else
> > +		gpiod_set_value(rfkill->reset_gpio, !blocked);
> 
> Really? I mean, there's not even a fallback where the cansleep() API
> calls the non-sleeping one if the cansleep isn't support? This is really
> ugly.

Actually, it looks like unconditionally using the cansleep API should be
fine since it just calls the same internal helper function. Please
respin.

johannes


      reply	other threads:[~2014-05-07  9:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1399392849-6021-1-git-send-email-loic.poulain@intel.com>
     [not found] ` <1399392849-6021-1-git-send-email-loic.poulain-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-05-07  9:02   ` [PATCH] rfkill-gpio: Use gpio cansleep version Johannes Berg
2014-05-07  9:04     ` Johannes Berg [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=1399453472.10517.8.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@intel.com \
    /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