From patchwork Tue Mar 29 07:31:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 64576 Delivered-To: patches@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1853955lbc; Tue, 29 Mar 2016 00:31:32 -0700 (PDT) X-Received: by 10.112.198.166 with SMTP id jd6mr392821lbc.12.1459236687190; Tue, 29 Mar 2016 00:31:27 -0700 (PDT) Return-Path: Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com. [2a00:1450:4010:c04::231]) by mx.google.com with ESMTPS id xr1si16103048lbb.190.2016.03.29.00.31.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Mar 2016 00:31:27 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::231 as permitted sender) client-ip=2a00:1450:4010:c04::231; 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::231 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org Received: by mail-lb0-x231.google.com with SMTP id qe11so4638499lbc.3 for ; Tue, 29 Mar 2016 00:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=72PJH+nV8QKZJmXUZMEw2ridLnzuYhRHAKJmfF5UHNA=; b=iU+O2jbVVWuGeZd9OGH8SL6i8fhOY7kwHBdDQ8CaW7s0X3haMbtgeczOgJbQqLvxGo lUnocKDSmGtn8hjHxS/dsfG40yOHnqkR0xIu+vSkRiWn89EmNs59Mm419esBTFKZz/pS Yc/9gm2autMNXv31+TQcV8BYJOBr2ZNPoH2mM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=72PJH+nV8QKZJmXUZMEw2ridLnzuYhRHAKJmfF5UHNA=; b=KRYuRTwTjTBoW0pjrakcfKgDcQ05qXlkLZLRQ2J/VONu8KZdAXX2rkKJjZQN3avmWO zzisqXoSQWXGXPaG0p/LypHkpDmTi1DS2sSz8gf6LxaBnOvYmGw8suEw+wBAdIheLxKn k27ch8IZ/fZBFi8Qz4j+nhKbTLEXLiaTOfiPzT6wSe3ALnSW7LM4P18BniXCPAjWwpJg 3xcunlOBMeczIUb9oEPtfjd0KM8o/SEFTIwi9WWgWRj16zQU2IzdA/1d/pMKqFAldk0L NnDVF1bVhxdTntRFNvQvQP63vf8kH5dkIZF7UC4JGLgrEe9V1rkWQeIX/lcVMQnJsbMi H8eA== X-Gm-Message-State: AD7BkJJk0vFBgi46yzQz3jlHDg+fuEMqE2/1oR3bI5QEWOYPJjSIdoGGp9AhKwbG/1VRnNbPsq4= X-Received: by 10.112.205.68 with SMTP id le4mr381712lbc.62.1459236687045; Tue, 29 Mar 2016 00:31:27 -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.25 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Mar 2016 00:31:25 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Subject: [PATCH 4/8] mmc: omap_hsmmc: Remove redundant runtime PM calls Date: Tue, 29 Mar 2016 09:31:09 +0200 Message-Id: <1459236673-5639-4-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. Signed-off-by: Ulf Hansson --- drivers/mmc/host/omap_hsmmc.c | 15 --------------- 1 file changed, 15 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index f9ac3bb..835943a 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -968,8 +968,6 @@ static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_req return; host->mrq = NULL; mmc_request_done(host->mmc, mrq); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); } /* @@ -1250,7 +1248,6 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd) int ret; /* Disable the clocks */ - pm_runtime_put_sync(host->dev); if (host->dbclk) clk_disable_unprepare(host->dbclk); @@ -1260,7 +1257,6 @@ static int omap_hsmmc_switch_opcond(struct omap_hsmmc_host *host, int vdd) /* Turn the power ON with given VDD 1.8 or 3.0v */ if (!ret) ret = omap_hsmmc_set_power(host->dev, 1, vdd); - pm_runtime_get_sync(host->dev); if (host->dbclk) clk_prepare_enable(host->dbclk); @@ -1368,8 +1364,6 @@ static void omap_hsmmc_dma_callback(void *param) host->mrq = NULL; mmc_request_done(host->mmc, mrq); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); } } @@ -1602,7 +1596,6 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) BUG_ON(host->req_in_progress); BUG_ON(host->dma_ch != -1); - pm_runtime_get_sync(host->dev); if (host->protect_card) { if (host->reqs_blocked < 3) { /* @@ -1619,8 +1612,6 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) req->data->error = -EBADF; req->cmd->retries = 0; mmc_request_done(mmc, req); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); return; } else if (host->reqs_blocked) host->reqs_blocked = 0; @@ -1634,8 +1625,6 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) req->data->error = err; host->mrq = NULL; mmc_request_done(mmc, req); - pm_runtime_mark_last_busy(host->dev); - pm_runtime_put_autosuspend(host->dev); return; } if (req->sbc && !(host->flags & AUTO_CMD23)) { @@ -1653,8 +1642,6 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) struct omap_hsmmc_host *host = mmc_priv(mmc); int do_send_init_stream = 0; - pm_runtime_get_sync(host->dev); - if (ios->power_mode != host->power_mode) { switch (ios->power_mode) { case MMC_POWER_OFF: @@ -1698,8 +1685,6 @@ static void omap_hsmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) send_init_stream(host); omap_hsmmc_set_bus_mode(host); - - pm_runtime_put_autosuspend(host->dev); } static int omap_hsmmc_get_cd(struct mmc_host *mmc)