From: shawn.guo@linaro.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] gpio/generic: initialize basic_mmio_gpio shadow variables properly
Date: Thu, 17 May 2012 15:35:02 +0800 [thread overview]
Message-ID: <1337240103-4756-2-git-send-email-shawn.guo@linaro.org> (raw)
In-Reply-To: <1337240103-4756-1-git-send-email-shawn.guo@linaro.org>
It fixes the issue in gpio-generic that commit fb14921 (gpio/mxc: add
missing initialization of basic_mmio_gpio shadow variables) manged to
fix in gpio-mxc driver, so that other platform specific drivers do not
suffer from the same problem over and over again.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
---
drivers/gpio/gpio-generic.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index e38dd0c..cfc9439 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -394,6 +394,10 @@ int bgpio_init(struct bgpio_chip *bgc, struct device *dev,
return ret;
bgc->data = bgc->read_reg(bgc->reg_dat);
+ if (bgc->gc.set == bgpio_set_set)
+ bgc->data = bgc->read_reg(bgc->reg_set);
+ if (bgc->reg_dir)
+ bgc->dir = bgc->read_reg(bgc->reg_dir);
return ret;
}
--
1.7.5.4
next prev parent reply other threads:[~2012-05-17 7:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 7:35 [PATCH 0/2] Fix basic_mmio_gpio shadow initialization Shawn Guo
2012-05-17 7:35 ` Shawn Guo [this message]
2012-05-17 15:47 ` [PATCH 1/2] gpio/generic: initialize basic_mmio_gpio shadow variables properly H Hartley Sweeten
2012-05-18 13:51 ` Shawn Guo
2012-05-19 5:44 ` Grant Likely
2012-05-19 5:45 ` Grant Likely
2012-05-17 7:35 ` [PATCH 2/2] gpio/mxc: remove basic_mmio_gpio shadow fixup Shawn Guo
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=1337240103-4756-2-git-send-email-shawn.guo@linaro.org \
--to=shawn.guo@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).