From: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
To: linux-arm-kernel@lists.infradead.org,
spi-devel-general@lists.sourceforge.net
Cc: naveenkrishna.ch@gmail.com, broonie@opensource.wolfsonmicro.com,
grant.likely@secretlab.ca, jaswinder.singh@linaro.org,
linux-samsung-soc@vger.kernel.org
Subject: [PATCH] spi: s3c64xx: Add fix for crash in spi suspend/resume
Date: Wed, 07 Nov 2012 11:40:12 +0530 [thread overview]
Message-ID: <1352268612-9671-1-git-send-email-ch.naveen@samsung.com> (raw)
From: Abhilash Kesavan <a.kesavan@samsung.com>
The SPI driver makes a gpio_request during initialization. The requested
gpios need to be populated as part of the s3c64xx_spi_driver_data so that
they can be released during suspend and requested again during resume.
Add the missing code to save the requested gpios as part of the driver
data. This fixes a SPI driver suspend crash.
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
---
This was tested on spi-next branch
http://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
With S2R patches submitted on mailing list.
http://www.spinics.net/lists/arm-kernel/msg205244.html
drivers/spi/spi-s3c64xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 01b2f56..57900a8 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -1112,7 +1112,7 @@ static int s3c64xx_spi_parse_dt_gpio(struct s3c64xx_spi_driver_data *sdd)
dev_err(dev, "invalid gpio[%d]: %d\n", idx, gpio);
goto free_gpio;
}
-
+ sdd->gpios[idx] = gpio;
ret = gpio_request(gpio, "spi-bus");
if (ret) {
dev_err(dev, "gpio [%d] request failed: %d\n",
--
1.7.9.5
next reply other threads:[~2012-11-07 6:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 6:10 Naveen Krishna Chatradhi [this message]
2012-11-07 8:23 ` [PATCH] spi: s3c64xx: Add fix for crash in spi suspend/resume Mark Brown
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=1352268612-9671-1-git-send-email-ch.naveen@samsung.com \
--to=ch.naveen@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=grant.likely@secretlab.ca \
--cc=jaswinder.singh@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=naveenkrishna.ch@gmail.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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).