From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: david-b@pacbell.net, Magnus Damm <magnus.damm@gmail.com>,
lethal@linux-sh.org, akpm@linux-foundation.org
Subject: [PATCH] gpiolib: request fixes
Date: Fri, 26 Dec 2008 14:21:21 +0900 [thread overview]
Message-ID: <20081226052121.6472.22847.sendpatchset@rx1.opensource.se> (raw)
From: Magnus Damm <damm@igel.co.jp>
Fix request related issues in gpiolib such as:
- fix request-already-requested handling in gpio_request()
- clear FLAG_REQUESTED on request error in gpio_direction_input()
- clear FLAG_REQUESTED on request error in gpio_direction_output()
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/gpio/gpiolib.c | 3 +++
1 file changed, 3 insertions(+)
--- 0001/drivers/gpio/gpiolib.c
+++ work/drivers/gpio/gpiolib.c 2008-12-26 13:09:50.000000000 +0900
@@ -789,6 +789,7 @@ int gpio_request(unsigned gpio, const ch
} else {
status = -EBUSY;
module_put(chip->owner);
+ goto done;
}
if (chip->request) {
@@ -924,6 +925,7 @@ int gpio_direction_input(unsigned gpio)
/* and it's not available to anyone else ...
* gpio_request() is the fully clean solution.
*/
+ clear_bit(FLAG_REQUESTED, &desc->flags);
goto lose;
}
}
@@ -977,6 +979,7 @@ int gpio_direction_output(unsigned gpio,
/* and it's not available to anyone else ...
* gpio_request() is the fully clean solution.
*/
+ clear_bit(FLAG_REQUESTED, &desc->flags);
goto lose;
}
}
next reply other threads:[~2008-12-26 5:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-26 5:21 Magnus Damm [this message]
2008-12-26 15:53 ` [PATCH] gpiolib: request fixes David Brownell
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=20081226052121.6472.22847.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david-b@pacbell.net \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
/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