From patchwork Wed Nov 7 06:10:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naveen Krishna Chatradhi X-Patchwork-Id: 1708051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 48F0A3FC8F for ; Wed, 7 Nov 2012 06:13:18 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVyrL-0003ZO-SC; Wed, 07 Nov 2012 06:11:31 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TVyrG-0003YW-K6 for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2012 06:11:28 +0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MD300F0GT62NO70@mailout1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2012 15:11:20 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.122]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 73.A1.12699.88BF9905; Wed, 07 Nov 2012 15:11:20 +0900 (KST) X-AuditID: cbfee61b-b7f616d00000319b-c8-5099fb88b9c9 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id D2.A1.12699.78BF9905; Wed, 07 Nov 2012 15:11:20 +0900 (KST) Received: from naveen-linux.sisodomain.com ([107.108.83.161]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MD300H7XT51HN10@mmp1.samsung.com> for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2012 15:11:19 +0900 (KST) From: Naveen Krishna Chatradhi To: linux-arm-kernel@lists.infradead.org, spi-devel-general@lists.sourceforge.net Subject: [PATCH] spi: s3c64xx: Add fix for crash in spi suspend/resume Date: Wed, 07 Nov 2012 11:40:12 +0530 Message-id: <1352268612-9671-1-git-send-email-ch.naveen@samsung.com> X-Mailer: git-send-email 1.7.9.5 DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrELMWRmVeSWpSXmKPExsWyRsSkSrfj98wAg5Z7AhabHl9jdWD02Lyk PoAxissmJTUnsyy1SN8ugSvj2qVljAVLuCqOXg1rYDzF0cXIySEhYCLxpPUXG4QtJnHh3nog m4tDSGApo8SGM8fZYYqOvV7DBJFYxCjx9Mp5dghnK5PEmfYZYFVsAmYSBxetBrNFBIIlevf/ AhvFLLCQUWLKs8+MXYwcHMICbhLfNhqB1LAIqEq0H9/DBGLzCrhIrLo2gwWkREJAQWLOJBuI EgGJb5MPQYVlJTYdYAaZKCGwg02i99x8RojjJCUOrrjBMoFRcAEjwypG0dSC5ILipPRcI73i xNzi0rx0veT83E2MwIA6/e+Z9A7GVQ0WhxgFOBiVeHgtUmcGCLEmlhVX5h5ilOBgVhLhPfIJ KMSbklhZlVqUH19UmpNafIjRB+iSicxSosn5wGDPK4k3NDYxNzU2tTQyMjM1xSGsJM7b7JES ICSQnliSmp2aWpBaBDOOiYNTqoFxw3El1ryzm9N+P3fc1HZvyia2jZUHi249vWi3QH634sJl IZH/HlTZzdGyjfra88ZhhdGXz6v1I09PaNj59bnhtqx329YvV57rsSzYVEs+tdGulf3KnafF mWvytJO0Hl17W3hFZNWO2x1Rb/y4rqZN/qx8y/fXk6T85z9vRTY9VWVg+Cu0aP62iUosxRmJ hlrMRcWJAFkXyYxVAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrILMWRmVeSWpSXmKPExsVy+t9jAd2O3zMDDC7cZLbY9PgaqwOjx+Yl 9QGMUQ2MNhmpiSmpRQqpecn5KZl56bZK3sHxzvGmZgaGuoaWFuZKCnmJuam2Si4+AbpumTlA U5UUyhJzSoFCAYnFxUr6dpgmhIa46VrANEbo+oYEwfUYGaCBhDWMGdcuLWMsWMJVcfRqWAPj KY4uRk4OCQETiWOv1zBB2GISF+6tZ+ti5OIQEljEKPH0ynl2CGcrk8SZ9hnsIFVsAmYSBxet BrNFBIIlevf/AutgFljIKDHl2WfGLkYODmEBN4lvG41AalgEVCXaj+8B28Ar4CKx6toMFpAS CQEFiTmTbCYwci9gZFjFKJpakFxQnJSea6RXnJhbXJqXrpecn7uJERyuz6R3MK5qsDjEKMDB qMTDa5E6M0CINbGsuDL3EKMEB7OSCO+RT0Ah3pTEyqrUovz4otKc1OJDjD5AyycyS4km5wNj Ka8k3tDYxNzU2NTSxMLEzBKHsJI4b7NHSoCQQHpiSWp2ampBahHMOCYOTqkGxvanIQ96Zr75 7n86qCe4b+WPBPPjK6S4DIy7NVSuCB/IZXn2gDV6zSP3M9rzXGds2lRlrp11NrBVmlfhjfed LSycj+4X3+HU9gy00F864VtdH/N3/weCa051vdscHpPa7tCUw8mmx1rH5cgl96NF9Ex79qRt 8p9F/2z583TTfLdgsXW6jPZlSizFGYmGWsxFxYkADtm1vYQCAAA= X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121107_011126_961893_543D6D50 X-CRM114-Status: GOOD ( 10.15 ) X-Spam-Score: -7.5 (-------) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-7.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [203.254.224.24 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 HDRS_LCASE Odd capitalization of message header Cc: grant.likely@secretlab.ca, naveenkrishna.ch@gmail.com, broonie@opensource.wolfsonmicro.com, linux-samsung-soc@vger.kernel.org, jaswinder.singh@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Abhilash Kesavan 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 Signed-off-by: Naveen Krishna Chatradhi --- 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",