From patchwork Tue Mar 29 07:31:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 64580 Delivered-To: patches@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1854065lbc; Tue, 29 Mar 2016 00:31:47 -0700 (PDT) X-Received: by 10.112.223.37 with SMTP id qr5mr386830lbc.19.1459236693656; Tue, 29 Mar 2016 00:31:33 -0700 (PDT) Return-Path: Received: from mail-lb0-x230.google.com (mail-lb0-x230.google.com. [2a00:1450:4010:c04::230]) by mx.google.com with ESMTPS id l11si16123409lfd.157.2016.03.29.00.31.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 00:31:33 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::230 as permitted sender) client-ip=2a00:1450:4010:c04::230; 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::230 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org Received: by mail-lb0-x230.google.com with SMTP id qe11so4639944lbc.3 for ; Tue, 29 Mar 2016 00:31:33 -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=3nfN5ruRHwzOCXbrl+uETrOAapdZV3SxCh9/UUTrJN0=; b=bbi/TmXAoPa1/yp+GrFXoEcdGdm1C3a0NX+mou6dtOM6KkiRCT+N2bm7hqtPFP2VTz Z5Ltgxm1H8gp6WrfNYwM5WVKw/Az4rxVa/lZ5VgQrz5ALr8se7JRMCyMSq9wIhm3ExHa sUqylEwZhtIqNtFtWPnbdozP/5dbn5IJQooCg= 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=3nfN5ruRHwzOCXbrl+uETrOAapdZV3SxCh9/UUTrJN0=; b=NzIDPWWjlxL1mewFArFMfPrnjisep8+8v9emnyvWoNuwvLOhHrEjuLGPhVSeSRBPKH Ttkb5LDtowY+4F4r/45PPY8Yu/5BKu+RmaY9CRilB2XRvX34MCMhJvF49zAncgJWr1SN M7Gg+FtnQO1ISsf08pnvygBCsdQxjjn/kSqXUEm0KfTEXq99wlAeAGhwBHyeOUHLJ3BI rmdGsFfdMZNH6hM8NkW/8Fy+td9kmoSmKF0jAQ8qpN406+4XSEcS0l/rcvgA9Dt3IQ0W bvJcDJL03ncXU9Q2VA8ODMARFb/U3TK7hoiGF6rOwwl/nswHAke48+k2URZka38C5q1Y gDyg== X-Gm-Message-State: AD7BkJLvSqhjI7TIfFUNRjSDhBKWaObYyI/d+6tUnWeZrBe5TzSU2Yyyv2sovlEepBi+AhKLp8M= X-Received: by 10.112.170.68 with SMTP id ak4mr330344lbc.94.1459236693527; Tue, 29 Mar 2016 00:31:33 -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.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2016 00:31:32 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Ian Molton Subject: [PATCH 8/8] mmc: tmio: Remove redundant runtime PM calls Date: Tue, 29 Mar 2016 09:31:13 +0200 Message-Id: <1459236673-5639-8-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: Ian Molton Signed-off-by: Ulf Hansson --- drivers/mmc/host/tmio_mmc_pio.c | 19 ------------------- 1 file changed, 19 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 03f6e74..d822299 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -264,9 +264,6 @@ static void tmio_mmc_reset_work(struct work_struct *work) tmio_mmc_abort_dma(host); mmc_request_done(host->mmc, mrq); - - pm_runtime_mark_last_busy(mmc_dev(host->mmc)); - pm_runtime_put_autosuspend(mmc_dev(host->mmc)); } /* called with host->lock held, interrupts disabled */ @@ -296,9 +293,6 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host) tmio_mmc_abort_dma(host); 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 tmio_mmc_done_work(struct work_struct *work) @@ -812,8 +806,6 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) spin_unlock_irqrestore(&host->lock, flags); - pm_runtime_get_sync(mmc_dev(mmc)); - if (mrq->data) { ret = tmio_mmc_start_data(host, mrq->data); if (ret) @@ -832,9 +824,6 @@ fail: host->mrq = NULL; mrq->cmd->error = ret; mmc_request_done(mmc, mrq); - - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); } static int tmio_mmc_clk_update(struct tmio_mmc_host *host) @@ -925,8 +914,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) struct device *dev = &host->pdev->dev; unsigned long flags; - pm_runtime_get_sync(mmc_dev(mmc)); - mutex_lock(&host->ios_lock); spin_lock_irqsave(&host->lock, flags); @@ -983,9 +970,6 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) host->clk_cache = ios->clock; mutex_unlock(&host->ios_lock); - - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); } static int tmio_mmc_get_ro(struct mmc_host *mmc) @@ -996,11 +980,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) if (ret >= 0) return ret; - pm_runtime_get_sync(mmc_dev(mmc)); ret = !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); - pm_runtime_mark_last_busy(mmc_dev(mmc)); - pm_runtime_put_autosuspend(mmc_dev(mmc)); return ret; }