From patchwork Thu Apr 5 20:19:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 132888 Delivered-To: patches@linaro.org Received: by 10.46.84.29 with SMTP id i29csp6712556ljb; Thu, 5 Apr 2018 13:20:12 -0700 (PDT) X-Received: by 10.46.93.219 with SMTP id v88mr14615322lje.88.1522959612648; Thu, 05 Apr 2018 13:20:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522959612; cv=none; d=google.com; s=arc-20160816; b=T5jW9rdoW7GSAwarsfd9n33iefzjEgxBlQQyaRz3mw9dzpNWSrzePHi9/7IOcfxgdL 8t2XV74ic0Nus5LqaEXd79Pfxi6H4e9iROOekLahgfvKaXqYGMUeIUU4nroBqroCpJ8n Qsz5bxX4bmZuo8kWonQWUhLT6f2jNti9qYx2W4MfKtUnWoXzF1XbtbSA7fWpdedfpLcO 4/K9dyoZD2e3FTN/ElYiYjEfNXfIVZCC0Or1EQJ5JBjshUHi/n3+qCL1srFg6yqrE94f THuv6CeyRoF5lG+S6lTgSJQq7CuMqdr9xzrDPzh5YbC5OEi9EDKtXyg3y2LAu7fEZfzD jsLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=k0+qaNqsFyizIaV35d7sXR0E1loyJuPdJPmi06Ym9W4=; b=Iw8IWr2Ief6rTAFYLRlHpCZv7TBmwjMRa1RyJ6hznmBI+5NcsGjECPNJ/69MgeT1LB rogY/AVj9CBb8a10TUveBA5LrAT0bSkcLT38mxBiJgT77Db4sN9bk2przVn1YiOsrbMG aTLcMn4vxvO8Z4pdUBU2UY6Wz/jOmikDFQ6f71xKbQUDWhmlCgM+MCKuoIcwofon8maE Zd6nZf7yz3S+e79UlAmMisFPdSLycbe4W9To7BYcnb2DcBkK8NG8r00FqDJFe4bLjRLw ckCcMTPGAmnYqQ1nwgXM8AUUZch7Co0buMaYii4KJ1XTHB59pU+zfHA4F6gxHvNHFep3 nFIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hMIXah7O; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m38-v6sor2220322lfi.52.2018.04.05.13.20.12 for (Google Transport Security); Thu, 05 Apr 2018 13:20:12 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hMIXah7O; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=k0+qaNqsFyizIaV35d7sXR0E1loyJuPdJPmi06Ym9W4=; b=hMIXah7OkVrSXpDX9LW3xNbxSyRLhK4N1/4O6iPcGOYYmqY75k1hSrT8nHIgL19vXL pNruVxviDg+mBNKGnh8a5bW2BzrFZrM7yU+WOpWWT6Q9VpIc+pHDV+x+Djmw5U1VIbWU 5TKjqibHHy/VdxiDhirgghton3/scXmFcp1Ks= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=k0+qaNqsFyizIaV35d7sXR0E1loyJuPdJPmi06Ym9W4=; b=UbLeRcdftL7RAARC6sL7G3CpW5CaeL/WlA8cz1xa5ZimDNEZxaaVPsn3KI39fdbkiO m18uC8SH+0d6iqc5s64i/ltB3b3a8kGeDU8Q5CI/JeP0pkmzQ8Z2nDxca6Z5UCeP7Tgf n3fIVMeyEk84e0c7WwfuP/LPpI1cyfSAac3M1zpxqCV/CwbYiTn77Vg0fCcPLjSWGQsa /9Xdh92Uyo0o8EvU2LqKdzS2eNEV6Xx+xLgv3w6DfasI39kMJvLxQDOMYfBRr+G00ohi z93sXO70JLjVdLKUbUPd97kCv3cvUrKwpG+1FOhI/LVk+A2Hif5ud0aJHHWt87naewY5 YBYg== X-Gm-Message-State: ALQs6tBJ3Z9843WfESD+9u3C4TkKnICcZWU/wznbmz3BhJdSyVaaWJLk BV/03TjPe1XZ8IRz45+dYZ2faVKY X-Google-Smtp-Source: AIpwx48WUa1f5mXtxrF4jCUqD7MNK/vmDr0hogWk/WiR8VIZXrLnwxXhXH0H8MmkUtx3oaMQ42GNww== X-Received: by 2002:a19:e995:: with SMTP id j21-v6mr830246lfk.119.1522959612282; Thu, 05 Apr 2018 13:20:12 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id h66-v6sm1687533lfi.89.2018.04.05.13.20.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 05 Apr 2018 13:20:11 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Adrian Hunter , Brian Norris , Shawn Lin , Doug Anderson , Hans de Goede , Quentin Schulz Subject: [PATCH 2/5] mmc: core: Rename ->reset() bus ops to ->hw_reset() Date: Thu, 5 Apr 2018 22:19:51 +0200 Message-Id: <1522959594-3411-3-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522959594-3411-1-git-send-email-ulf.hansson@linaro.org> References: <1522959594-3411-1-git-send-email-ulf.hansson@linaro.org> The bus ops ->reset() executes a full HW reset of the card, as the calling function mmc_hw_reset() also indicates by its name. Let's convert to follow the similar names, for both the bus ops callback and for the corresponding bus ops functions, as to clarify the purpose of code. Signed-off-by: Ulf Hansson --- drivers/mmc/core/core.c | 6 +++--- drivers/mmc/core/core.h | 2 +- drivers/mmc/core/mmc.c | 4 ++-- drivers/mmc/core/sd.c | 4 ++-- drivers/mmc/core/sdio.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 121ce50..3e17c62 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2435,16 +2435,16 @@ int mmc_hw_reset(struct mmc_host *host) return -EINVAL; mmc_bus_get(host); - if (!host->bus_ops || host->bus_dead || !host->bus_ops->reset) { + if (!host->bus_ops || host->bus_dead || !host->bus_ops->hw_reset) { mmc_bus_put(host); return -EOPNOTSUPP; } - ret = host->bus_ops->reset(host); + ret = host->bus_ops->hw_reset(host); mmc_bus_put(host); if (ret) - pr_warn("%s: tried to reset card, got error %d\n", + pr_warn("%s: tried to HW reset card, got error %d\n", mmc_hostname(host), ret); return ret; diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index d6303d6..367ed11 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -32,7 +32,7 @@ struct mmc_bus_ops { int (*power_restore)(struct mmc_host *); int (*alive)(struct mmc_host *); int (*shutdown)(struct mmc_host *); - int (*reset)(struct mmc_host *); + int (*hw_reset)(struct mmc_host *); }; void mmc_attach_bus(struct mmc_host *host, const struct mmc_bus_ops *ops); diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 6f8ebd6..89c99d9 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -2117,7 +2117,7 @@ static int mmc_can_reset(struct mmc_card *card) return 1; } -static int mmc_reset(struct mmc_host *host) +static int _mmc_hw_reset(struct mmc_host *host) { struct mmc_card *card = host->card; @@ -2151,7 +2151,7 @@ static const struct mmc_bus_ops mmc_ops = { .runtime_resume = mmc_runtime_resume, .alive = mmc_alive, .shutdown = mmc_shutdown, - .reset = mmc_reset, + .hw_reset = _mmc_hw_reset, }; /* diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index baf3d5d..b169f34 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1214,7 +1214,7 @@ static int mmc_sd_runtime_resume(struct mmc_host *host) return 0; } -static int mmc_sd_reset(struct mmc_host *host) +static int mmc_sd_hw_reset(struct mmc_host *host) { mmc_power_cycle(host, host->card->ocr); return mmc_sd_init_card(host, host->card->ocr, host->card); @@ -1229,7 +1229,7 @@ static const struct mmc_bus_ops mmc_sd_ops = { .resume = mmc_sd_resume, .alive = mmc_sd_alive, .shutdown = mmc_sd_suspend, - .reset = mmc_sd_reset, + .hw_reset = mmc_sd_hw_reset, }; /* diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index c20168a..0124e0e 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1038,7 +1038,7 @@ static int mmc_sdio_runtime_resume(struct mmc_host *host) return ret; } -static int mmc_sdio_reset(struct mmc_host *host) +static int mmc_sdio_hw_reset(struct mmc_host *host) { mmc_power_cycle(host, host->card->ocr); return mmc_sdio_power_restore(host); @@ -1054,7 +1054,7 @@ static const struct mmc_bus_ops mmc_sdio_ops = { .runtime_resume = mmc_sdio_runtime_resume, .power_restore = mmc_sdio_power_restore, .alive = mmc_sdio_alive, - .reset = mmc_sdio_reset, + .hw_reset = mmc_sdio_hw_reset, };