From: "John W. Linville" <linville@tuxdriver.com>
To: Loic Poulain <loic.poulain@intel.com>
Cc: johannes@sipsolutions.net, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] net: rfkill: gpio: Fix clock status
Date: Wed, 17 Sep 2014 11:11:43 -0400 [thread overview]
Message-ID: <20140917151142.GA13392@tuxdriver.com> (raw)
In-Reply-To: <1410872038-4604-1-git-send-email-loic.poulain@intel.com>
On Tue, Sep 16, 2014 at 02:53:58PM +0200, Loic Poulain wrote:
> Clock is disabled when the device is blocked.
> So, clock_enabled is the logical negation of "blocked".
>
> Signed-off-by: Loic Poulain <loic.poulain@intel.com>
> ---
> net/rfkill/rfkill-gpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
> index 14c98e4..408e51f 100644
> --- a/net/rfkill/rfkill-gpio.c
> +++ b/net/rfkill/rfkill-gpio.c
> @@ -54,7 +54,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked)
> if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled)
> clk_disable(rfkill->clk);
>
> - rfkill->clk_enabled = blocked;
> + rfkill->clk_enabled = !blocked;
>
> return 0;
> }
This looks like the right fix, but...the code has been that way for
a long time. If this patch is correct, how has this gone undetected
for so long?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2014-09-17 15:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 12:53 [PATCH] net: rfkill: gpio: Fix clock status Loic Poulain
2014-09-17 15:11 ` John W. Linville [this message]
2014-09-17 15:34 ` Loic Poulain
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=20140917151142.GA13392@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=johannes@sipsolutions.net \
--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;
as well as URLs for NNTP newsgroup(s).