From: David Brownell <david-b@pacbell.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>,
eric miao <eric.y.miao@gmail.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: [patch 2.6.25-rc4] gpio/pca953x bugfix: mark as can_sleep
Date: Sun, 9 Mar 2008 12:56:19 -0800 [thread overview]
Message-ID: <200803091356.20024.david-b@pacbell.net> (raw)
The pca953x driver is an I2C driver so gpio_chip->can_sleep should be set.
This lets upper layers know they should use the gpio_*_cansleep() calls
to access values, and may not access them from nonsleeping contexts.
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
Merge before 2.6.25-final, please. This will for example prevent
leds-gpio from issuing blocking I2C calls from timer/irq contexts.
drivers/gpio/pca953x.c | 1 +
1 file changed, 1 insertion(+)
--- g26.orig/drivers/gpio/pca953x.c 2008-03-08 11:17:22.000000000 -0800
+++ g26/drivers/gpio/pca953x.c 2008-03-09 13:51:13.000000000 -0700
@@ -184,6 +184,7 @@ static void pca953x_setup_gpio(struct pc
gc->direction_output = pca953x_gpio_direction_output;
gc->get = pca953x_gpio_get_value;
gc->set = pca953x_gpio_set_value;
+ gc->can_sleep = 1;
gc->base = chip->gpio_start;
gc->ngpio = gpios;
next reply other threads:[~2008-03-09 20:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-09 20:56 David Brownell [this message]
2008-03-10 5:14 ` eric miao
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=200803091356.20024.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@linux-foundation.org \
--cc=arnaud.patard@rtp-net.org \
--cc=eric.y.miao@gmail.com \
--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
all inboxes | Powered by JetHome®