mmc: pwrseq: use gpiod_get() instead of index 0
authorJavier Martinez Canillas <javier@osg.samsung.com>
Mon, 14 Sep 2015 12:00:35 +0000 (14:00 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 26 Oct 2015 14:59:55 +0000 (15:59 +0100)
The gpiod_get() function expands to gpiod_get_index() with index 0
so it's better to use it since is easier to read and more concise.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/pwrseq_emmc.c

index 9d6d2fb217967d069ff2f18db0b403dff05483e0..137c97fb7aa8b35adaf1e83495c853f3c3bd8436 100644 (file)
@@ -76,7 +76,7 @@ struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,
        if (!pwrseq)
                return ERR_PTR(-ENOMEM);
 
-       pwrseq->reset_gpio = gpiod_get_index(dev, "reset", 0, GPIOD_OUT_LOW);
+       pwrseq->reset_gpio = gpiod_get(dev, "reset", GPIOD_OUT_LOW);
        if (IS_ERR(pwrseq->reset_gpio)) {
                ret = PTR_ERR(pwrseq->reset_gpio);
                goto free;