Skip to contentSkip to conversation

spi: s3c64xx: Add fix for crash in spi suspend/resume

PATCH New Naveen Krishna Chatradhi 2 participants 2 messages Nov 7, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spi: s3c64xx: Add fix for crash in spi suspend/resume

From: Abhilash Kesavan <[email protected]>

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.

---

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(-)
drivers/spi/spi-s3c64xx.c +1 -1
index 01b2f56..57900a8 100644
@@ -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",
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 spi: s3c64xx: Add fix for crash in spi suspend/resume

Quoted 5 lines · Naveen Krishna Chatradhi

From: Abhilash Kesavan <[email protected]>

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.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121107/8043c2a9/attachment-0001.sig>