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: 8683171 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 373719F3D1 for ; Tue, 29 Mar 2016 07:31:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 45E772015A for ; Tue, 29 Mar 2016 07:31:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B2DC201F5 for ; Tue, 29 Mar 2016 07:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752022AbcC2Hb0 (ORCPT ); Tue, 29 Mar 2016 03:31:26 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:34168 "EHLO mail-lb0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751876AbcC2HbZ (ORCPT ); Tue, 29 Mar 2016 03:31:25 -0400 Received: by mail-lb0-f171.google.com with SMTP id vo2so4699567lbb.1 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=VyVE3Nig9CVpIG1ufXJTDTTweqyXdrC/yu5atvj2v5lpIPiciVApx8kl6zrXlpiLr/ cXLci8CRPv+XVpKMdy0bnZbdzjkDGqbS9AE5AD4MmM01vytEe1lKuvAQaDl1BK+RluIy mzpUtIDjPUzlT4DK8+G23feLQXHpU8XU0GlBm9vyyQVjAzj5yP7btgmbhcfsqGX9UgrA 5wXx70oYRwf0Av/U6v3sbbvheiphdeimAwC3KvAj8DzDGBhcyO+iNyfxGkF5c0XRM6wp bQJnuVlimCzABifsCOGVarxy6dVJwZFartKCnXxjmPIfrSP6gU0EbNnF3ekNv9kAhN5w 6x6A== X-Gm-Message-State: AD7BkJLgMamoswyAKvjd3KyJaFR1wO/T058u0W3cvkKpeWNiZVuGumA3eCxiICnVeXCc4Pii X-Received: by 10.112.52.230 with SMTP id w6mr327243lbo.144.1459236684028; Tue, 29 Mar 2016 00:31:24 -0700 (PDT) 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;