Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933535AbcDESIm (ORCPT ); Tue, 5 Apr 2016 14:08:42 -0400 Received: from mail-cys01nam02on0046.outbound.protection.outlook.com ([104.47.37.46]:33629 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933317AbcDESIj (ORCPT ); Tue, 5 Apr 2016 14:08:39 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=xilinx.com; From: Shubhrajyoti Datta To: CC: , , Shubhrajyoti Datta Subject: [PATCH 7/7] spi: cadence: Return the error code for cdns_spi_suspend and cdns_spi_resume Date: Tue, 5 Apr 2016 23:37:54 +0530 Message-ID: <1459879674-13012-7-git-send-email-shubhraj@xilinx.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1459879674-13012-1-git-send-email-shubhraj@xilinx.com> References: <1459879674-13012-1-git-send-email-shubhraj@xilinx.com> X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-22240.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.199.60.83;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(92566002)(110136002)(19580395003)(47776003)(586003)(2950100001)(90966002)(189998001)(50226001)(19580405001)(4001430100002)(103686003)(63266004)(2351001)(5008740100001)(4326007)(46386002)(42186005)(76176999)(33646002)(5003940100001)(2906002)(36756003)(50466002)(36386004)(48376002)(6806005)(106466001)(11100500001)(52956003)(575784001)(50986999)(1096002)(1220700001)(107886002)(45336002)(81166005)(86362001)(87936001)(229853001)(107986001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1NAM02HT198;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: c50bb79d-9064-4873-0a9a-08d35d7d4f3a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(8251501002);SRVR:CY1NAM02HT198; X-Microsoft-Antispam-PRVS: <2c5bfa0f588b4cb0bacfe8c98c7acbe9@CY1NAM02HT198.eop-nam02.prod.protection.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13017025)(5005006)(13018025)(13015025)(13024025)(13023025)(8121501046)(10201501046)(3002001);SRVR:CY1NAM02HT198;BCL:0;PCL:0;RULEID:;SRVR:CY1NAM02HT198; X-Forefront-PRVS: 0903DD1D85 X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2016 18:08:36.8683 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1NAM02HT198 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 45 Return the error code for cdns_spi_suspend and cdns_spi_resume. Also fixes a comment where which claims that the error code is returned. Signed-off-by: Shubhrajyoti Datta --- drivers/spi/spi-cadence.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/spi/spi-cadence.c b/drivers/spi/spi-cadence.c index d0cdd18..07481e1 100644 --- a/drivers/spi/spi-cadence.c +++ b/drivers/spi/spi-cadence.c @@ -615,16 +615,14 @@ static int cdns_spi_remove(struct platform_device *pdev) * This function disables the SPI controller and * changes the driver state to "suspend" * - * Return: Always 0 + * Return: 0 on success and error value on error */ static int __maybe_unused cdns_spi_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct spi_master *master = platform_get_drvdata(pdev); - spi_master_suspend(master); - - return 0; + return spi_master_suspend(master); } /** @@ -640,9 +638,7 @@ static int __maybe_unused cdns_spi_resume(struct device *dev) struct platform_device *pdev = to_platform_device(dev); struct spi_master *master = platform_get_drvdata(pdev); - spi_master_resume(master); - - return 0; + return spi_master_resume(master); } /** -- 1.7.1