Message ID | 1395081118-15248-2-git-send-email-b.zolnierkie@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <davinci-linux-open-source-bounces@linux.davincidsp.com> X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AC76FBF540 for <patchwork-davinci@patchwork.kernel.org>; Tue, 18 Mar 2014 05:27:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D642420373 for <patchwork-davinci@patchwork.kernel.org>; Tue, 18 Mar 2014 05:27:56 +0000 (UTC) Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B26B320256 for <patchwork-davinci@patchwork.kernel.org>; Tue, 18 Mar 2014 05:27:51 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2I5QpCP017495; Tue, 18 Mar 2014 00:26:51 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2I5QpRC018292; Tue, 18 Mar 2014 00:26:51 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Tue, 18 Mar 2014 00:26:51 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2I5QpC0028657; Tue, 18 Mar 2014 00:26:51 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id D4AFA80628; Mon, 17 Mar 2014 23:26:50 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflxv17.itg.ti.com (dflxv17.itg.ti.com [128.247.5.93]) by linux.omap.com (Postfix) with ESMTP id 1715380626 for <davinci-linux-open-source@linux.davincidsp.com>; Mon, 17 Mar 2014 12:32:20 -0600 (CST) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflxv17.itg.ti.com (8.14.3/8.13.8) with ESMTP id s2HIWJLU024365 for <davinci-linux-open-source@linux.davincidsp.com>; Mon, 17 Mar 2014 13:32:19 -0500 Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by white.ext.ti.com (8.13.7/8.13.7) with ESMTP id s2HIWJX2031814 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <davinci-linux-open-source@linux.davincidsp.com>; Mon, 17 Mar 2014 13:32:19 -0500 Received: from [216.82.253.147:9432] by server-14.bemta-7.messagelabs.com id 2B/36-25548-3BF37235; Mon, 17 Mar 2014 18:32:19 +0000 X-Env-Sender: b.zolnierkie@samsung.com X-Msg-Ref: server-8.tower-165.messagelabs.com!1395081137!10089086!1 X-Originating-IP: [203.254.224.25] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjAzLjI1NC4yMjQuMjUgPT4gMzcxMzg3\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15453 invoked from network); 17 Mar 2014 18:32:18 -0000 Received: from mailout2.samsung.com (HELO mailout2.samsung.com) (203.254.224.25) by server-8.tower-165.messagelabs.com with DES-CBC3-SHA encrypted SMTP; 17 Mar 2014 18:32:18 -0000 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2L00I4BFHS3E30@mailout2.samsung.com> for davinci-linux-open-source@linux.davincidsp.com; Tue, 18 Mar 2014 03:32:16 +0900 (KST) X-AuditID: cbfee61b-b7f456d000006dfd-96-53273fb0b79a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 07.AF.28157.0BF37235; Tue, 18 Mar 2014 03:32:16 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N2L00380FHDPR10@mmp2.samsung.com>; Tue, 18 Mar 2014 03:32:16 +0900 (KST) From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> To: Tejun Heo <tj@kernel.org> Subject: [PATCH 1/4] ata: ahci_platform: fix ahci_platform_data->suspend method handling Date: Mon, 17 Mar 2014 19:31:55 +0100 Message-ID: <1395081118-15248-2-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395081118-15248-1-git-send-email-b.zolnierkie@samsung.com> References: <1395081118-15248-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrALMWRmVeSWpSXmKPExsVy+t9jQd0N9urBBmePyFhsnLGe1eLcrQZW izsrmC02Pb7GanFsxyMmi8u75rBZ7O/dwGTR0N3DbjFnxmZWi1/LjzJarLz4l9mB2+P6q/9M Hjtn3WX32LSqk81jzrQmFo+TF06yeGxeUu/Rt2UVo8fTH3uZPY7f2M7k8XmTXABXFJdNSmpO Zllqkb5dAldGd88sxoLfHBV/Jk1haWDczN7FyMkhIWAiMeneLFYIW0ziwr31bF2MXBxCAtMZ Jc4/3sUO4XQxSTQ9WwLWwSZgJTGxfRUjiC0iICtxZdpDRpAiZoHHTBI7V04BKxIWiJK4sWAZ 2FgWAVWJe4f2gzXwCnhIfNy1hw1inaJE97MJYDangKfE6h/fmUFsIaCaph3PmCcw8i5gZFjF KJpakFxQnJSea6RXnJhbXJqXrpecn7uJERyuz6R3MK5qsDjEKMDBqMTD+4JNPViINbGsuDL3 EKMEB7OSCK+ECVCINyWxsiq1KD++qDQntfgQozQHi5I478FW60AhgfTEktTs1NSC1CKYLBMH p1QDI/8d6a1HVq9pPlMguISb93HOwQaJo0L/IubPn3FA4KjZL2drt/cpH+xer+ms6rGI9px/ fU7IsSfOTUsOJJ2880yKSUzcVmi3xemQSD3xNS2i/xiXm9Q3xwSrbrYXvbu648AjgUPPt2iH zlC4Xnp8v7nIF/kKsZiba5Zwnp345vDvCP4QsYa6h0osxRmJhlrMRcWJAMcBwh5TAgAA X-Mailman-Approved-At: Mon, 17 Mar 2014 23:25:18 -0600 CC: <davinci-linux-open-source@linux.davincidsp.com>, Shiraz Hashim <shiraz.hashim@st.com>, Kevin Hilman <khilman@deeprootsystems.com>, <spear-devel@list.st.com>, <linux-kernel@vger.kernel.org>, <linux-ide@vger.kernel.org>, <b.zolnierkie@samsung.com>, Viresh Kumar <viresh.linux@gmail.com>, <linux-arm-kernel@lists.infradead.org> X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: <davinci-linux-open-source.linux.davincidsp.com> List-Unsubscribe: <http://linux.davincidsp.com/mailman/options/davinci-linux-open-source>, <mailto:davinci-linux-open-source-request@linux.davincidsp.com?subject=unsubscribe> List-Archive: <http://linux.davincidsp.com/pipermail/davinci-linux-open-source> List-Post: <mailto:davinci-linux-open-source@linux.davincidsp.com> List-Help: <mailto:davinci-linux-open-source-request@linux.davincidsp.com?subject=help> List-Subscribe: <http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source>, <mailto:davinci-linux-open-source-request@linux.davincidsp.com?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: <davinci-linux-open-source-bounces@linux.davincidsp.com> Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c index 70fbf66..7bd6adf 100644 --- a/drivers/ata/ahci_platform.c +++ b/drivers/ata/ahci_platform.c @@ -521,12 +521,19 @@ int ahci_platform_suspend(struct device *dev) if (rc) return rc; - if (pdata && pdata->suspend) - return pdata->suspend(dev); + if (pdata && pdata->suspend) { + rc = pdata->suspend(dev); + if (rc) + goto resume_host; + } ahci_platform_disable_resources(hpriv); return 0; + +resume_host: + ahci_platform_resume_host(dev); + return rc; } EXPORT_SYMBOL_GPL(ahci_platform_suspend);
Looking at ST SPEAr1340 AHCI code (the only user of the deprecated pdata->suspend and pdata->resume) it is obvious the we should return after calling pdata->suspend() only if the function have returned non-zero return value. The code has been broken since commit 1e70c2 ("ata/ahci_platform: Add clock framework support"). Fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> --- drivers/ata/ahci_platform.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)