From patchwork Tue Mar 29 07:31:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 64574 Delivered-To: patches@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1853903lbc; Tue, 29 Mar 2016 00:31:24 -0700 (PDT) X-Received: by 10.112.135.39 with SMTP id pp7mr317277lbb.43.1459236684154; Tue, 29 Mar 2016 00:31:24 -0700 (PDT) Return-Path: Received: from mail-lb0-x22a.google.com (mail-lb0-x22a.google.com. [2a00:1450:4010:c04::22a]) by mx.google.com with ESMTPS id k13si8070279lfb.59.2016.03.29.00.31.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 00:31:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) client-ip=2a00:1450:4010:c04::22a; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::22a as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org Received: by mail-lb0-x22a.google.com with SMTP id u8so4726528lbk.0 for ; Tue, 29 Mar 2016 00:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2dhwB12UAHc2+2gf36GdlO6Lgu8kLwjywoHKBF5/8Kk=; b=djhpGTJ/UxRxhKJRoyGcCJbtHmFM4bmA704RdEJlNX//G06bdjaFUNyOzL8zf0G1/W H/VqCyMUkrMnG8AxuunecTleRs25Q/Km1slt/eTOQ2pqIRPfGn3ax3ytMTzTqQqRoBq+ yhfUk29HdsEGRBlEMswjxz0X8bds8nOB/qWbM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2dhwB12UAHc2+2gf36GdlO6Lgu8kLwjywoHKBF5/8Kk=; b=UQ58yuvE9GCDSbTfCpi2HV1sTKm951kX/zkdTr6EcNoDPwSos8od3GULkg/pHgKMOL ZFzz8PLQtPF1pc+bTP+7x6lab6t5icZzSGUucnQE02iBdatJ+FcRYxAnB3chNl7RhV04 riA8S45SyOr9mdAF9D4KEogmYhRt1smGf1MMhFdUARiZYfYy5na6tYGrZ9NPg3k1l2iC 0tOsK1MbHhWAeiCzPVeh9fgIdfLCegpyMzyldOimk8rshQaivaFJ9SMhKw5K4QtzALML x0Fqv+9k/ZqE0GYRp1E4hABinD6IpZhjNR3D0ubPCIqHA8kO1vANmVXysRnLzDrRlE2B meTg== X-Gm-Message-State: AD7BkJIrrGjj0aOTsnPqcU7VddjxcxK+L3WFC5mQJcBVDLNS8sjf+cHnfkcaCJ4YezbutnASFBo= X-Received: by 10.112.52.230 with SMTP id w6mr327243lbo.144.1459236684028; Tue, 29 Mar 2016 00:31:24 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-83-233-167-104.cust.bredband2.com. [83.233.167.104]) by smtp.gmail.com with ESMTPSA id qh4sm5033100lbb.43.2016.03.29.00.31.22 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2016 00:31:22 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Russell King Subject: [PATCH 2/8] mmc: mmci: Remove redundant runtime PM calls Date: Tue, 29 Mar 2016 09:31:07 +0200 Message-Id: <1459236673-5639-2-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459236673-5639-1-git-send-email-ulf.hansson@linaro.org> References: <1459236673-5639-1-git-send-email-ulf.hansson@linaro.org> Commit 9250aea76bfc ("mmc: core: Enable runtime PM management of host devices"), made some calls to the runtime PM API from the driver redundant. Especially those which deals with runtime PM reference counting, so let's remove them. Cc: Russell King Signed-off-by: Ulf Hansson --- drivers/mmc/host/mmci.c | 20 -------------------- 1 file changed, 20 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2e6c968..df990bb 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -226,16 +226,11 @@ static int mmci_card_busy(struct mmc_host *mmc) unsigned long flags; int busy = 0; - pm_runtime_get_sync(mmc_dev(mmc)); - spin_lock_irqsave(&host->lock, flags); if (readl(host->base + MMCISTATUS) & MCI_ST_CARDBUSY) busy = 1; spin_unlock_irqrestore(&host->lock, flags); - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); - return busy; } @@ -381,9 +376,6 @@ mmci_request_end(struct mmci_host *host, struct mmc_request *mrq) host->cmd = NULL; mmc_request_done(host->mmc, mrq); - - pm_runtime_mark_last_busy(mmc_dev(host->mmc)); - pm_runtime_put_autosuspend(mmc_dev(host->mmc)); } static void mmci_set_mask1(struct mmci_host *host, unsigned int mask) @@ -1290,8 +1282,6 @@ static void mmci_request(struct mmc_host *mmc, struct mmc_request *mrq) return; } - pm_runtime_get_sync(mmc_dev(mmc)); - spin_lock_irqsave(&host->lock, flags); host->mrq = mrq; @@ -1318,8 +1308,6 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) unsigned long flags; int ret; - pm_runtime_get_sync(mmc_dev(mmc)); - if (host->plat->ios_handler && host->plat->ios_handler(mmc_dev(mmc), ios)) dev_err(mmc_dev(mmc), "platform ios_handler failed\n"); @@ -1414,9 +1402,6 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) mmci_reg_delay(host); spin_unlock_irqrestore(&host->lock, flags); - - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); } static int mmci_get_cd(struct mmc_host *mmc) @@ -1440,8 +1425,6 @@ static int mmci_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios) if (!IS_ERR(mmc->supply.vqmmc)) { - pm_runtime_get_sync(mmc_dev(mmc)); - switch (ios->signal_voltage) { case MMC_SIGNAL_VOLTAGE_330: ret = regulator_set_voltage(mmc->supply.vqmmc, @@ -1459,9 +1442,6 @@ static int mmci_sig_volt_switch(struct mmc_host *mmc, struct mmc_ios *ios) if (ret) dev_warn(mmc_dev(mmc), "Voltage switch failed\n"); - - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); } return ret;