linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: linux-gpio@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>
Cc: linux-mmc@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>,
	Kevin Hilman <khilman@baylibre.com>
Subject: [PATCH 2/9] mmc: meson-gx: Convert to pinctrl_select_default_state()
Date: Fri,  6 Dec 2019 18:08:14 +0100	[thread overview]
Message-ID: <20191206170821.29711-3-ulf.hansson@linaro.org> (raw)
In-Reply-To: <20191206170821.29711-1-ulf.hansson@linaro.org>

Let's drop the boilerplate code for managing the default pinctrl state and
convert into using the new pinctrl_select_default_state().

Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/host/meson-gx-mmc.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index e712315c7e8d..35400cf2a2e4 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -161,7 +161,6 @@ struct meson_host {
 	bool dram_access_quirk;
 
 	struct pinctrl *pinctrl;
-	struct pinctrl_state *pins_default;
 	struct pinctrl_state *pins_clk_gate;
 
 	unsigned int bounce_buf_size;
@@ -327,7 +326,7 @@ static void meson_mmc_clk_ungate(struct meson_host *host)
 	u32 cfg;
 
 	if (host->pins_clk_gate)
-		pinctrl_select_state(host->pinctrl, host->pins_default);
+		pinctrl_select_default_state(host->dev);
 
 	/* Make sure the clock is not stopped in the controller */
 	cfg = readl(host->regs + SD_EMMC_CFG);
@@ -1101,13 +1100,6 @@ static int meson_mmc_probe(struct platform_device *pdev)
 		goto free_host;
 	}
 
-	host->pins_default = pinctrl_lookup_state(host->pinctrl,
-						  PINCTRL_STATE_DEFAULT);
-	if (IS_ERR(host->pins_default)) {
-		ret = PTR_ERR(host->pins_default);
-		goto free_host;
-	}
-
 	host->pins_clk_gate = pinctrl_lookup_state(host->pinctrl,
 						   "clk-gate");
 	if (IS_ERR(host->pins_clk_gate)) {
-- 
2.17.1


  parent reply	other threads:[~2019-12-06 17:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 17:08 [PATCH 0/9] pinctrl: Consolidate some pinctrl code for mmc Ulf Hansson
2019-12-06 17:08 ` [PATCH 1/9] pinctrl: core: Add pinctrl_select_default_state() and export it Ulf Hansson
2019-12-16  8:02   ` Linus Walleij
2019-12-16 12:09     ` Ulf Hansson
2019-12-06 17:08 ` Ulf Hansson [this message]
2019-12-10 10:06   ` [PATCH 2/9] mmc: meson-gx: Convert to pinctrl_select_default_state() Jerome Brunet
2019-12-06 17:08 ` [PATCH 3/9] mmc: mmci: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 4/9] mmc: usdhi6rol0: " Ulf Hansson
2019-12-09  9:00   ` Jesper Nilsson
2019-12-06 17:08 ` [PATCH 5/9] mmc: omap_hsmmc: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 6/9] mmc: sdhci-esdhc-imx: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 7/9] mmc: atmel-mci: " Ulf Hansson
2019-12-06 17:08 ` [PATCH 8/9] mmc: jz4740: " Ulf Hansson
2019-12-07 16:28   ` Paul Cercueil
2019-12-08 23:56   ` Linus Walleij
2019-12-06 17:08 ` [PATCH 9/9] mmc: uniphier-sd: " Ulf Hansson
2019-12-09  5:12   ` Masahiro Yamada
2019-12-16  8:02 ` [PATCH 0/9] pinctrl: Consolidate some pinctrl code for mmc Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191206170821.29711-3-ulf.hansson@linaro.org \
    --to=ulf.hansson@linaro.org \
    --cc=khilman@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).