From patchwork Fri May 18 17:30:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 10411711 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5139F6037D for ; Fri, 18 May 2018 17:30:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41027289D8 for ; Fri, 18 May 2018 17:30:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35C4F28A51; Fri, 18 May 2018 17:30:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8D5628A17 for ; Fri, 18 May 2018 17:30:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751588AbeERRaQ (ORCPT ); Fri, 18 May 2018 13:30:16 -0400 Received: from muru.com ([72.249.23.125]:43238 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751363AbeERRaP (ORCPT ); Fri, 18 May 2018 13:30:15 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id 6EDB8812C; Fri, 18 May 2018 17:32:25 +0000 (UTC) From: Tony Lindgren To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-omap@vger.kernel.org Subject: [PATCH 2/2] spi: omap2-mcspi: Remove unnecessary pm_runtime_force_suspend() Date: Fri, 18 May 2018 10:30:08 -0700 Message-Id: <20180518173008.73291-3-tony@atomide.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518173008.73291-1-tony@atomide.com> References: <20180518173008.73291-1-tony@atomide.com> Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 5a686b2c9ed4 ("spi: omap2-mcspi: Idle hardware during suspend and resume") added calls for pm_runtime_force_suspend() and pm_runtime_force_resume() to make sure spi is idled between device_prepare() and device_complete(). But testing Linux next, I now noticed that we will get the following: spi_master spi0: Failed to power device: -13 Looking at things more turns out we can just remove this non-standard code. I was probably testing with some extra experimental patches earlier when I thought we need pm_runtime_force_suspend() and pm_runtime_force_resume(). Fixes: 5a686b2c9ed4 ("spi: omap2-mcspi: Idle hardware during suspend and resume") Signed-off-by: Tony Lindgren --- drivers/spi/spi-omap2-mcspi.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -1467,20 +1467,6 @@ MODULE_ALIAS("platform:omap2_mcspi"); #ifdef CONFIG_SUSPEND static int omap2_mcspi_suspend_noirq(struct device *dev) { - int error; - - /* - * Make sure device gets idled if other drivers call SPI - * functions between device_prepare() and device_complete() - */ - error = pm_runtime_force_suspend(dev); - if (error < 0) { - dev_err(dev, "%s: force suspend failed: %i\n", - __func__, error); - - return error; - } - return pinctrl_pm_select_sleep_state(dev); } @@ -1495,14 +1481,6 @@ static int omap2_mcspi_resume_noirq(struct device *dev) dev_warn(mcspi->dev, "%s: failed to set pins: %i\n", __func__, error); - error = pm_runtime_force_resume(mcspi->dev); - if (error < 0) { - dev_warn(mcspi->dev, "%s: force resume failed: %i\n", - __func__, error); - - return error; - } - return 0; }