Skip to content

Commit f6862c7

Browse files
aakoskintmlind
authored andcommitted
mmc: omap: fix deferred probe
After a deferred probe, GPIO descriptor lookup will fail with EBUSY. Fix by using managed descriptors. Fixes: e519f0b ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen <[email protected]> Message-ID: <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Acked-by: Ulf Hansson <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent d4debbc commit f6862c7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/mmc/host/omap.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,18 +1259,18 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, int id)
12591259
slot->pdata = &host->pdata->slots[id];
12601260

12611261
/* Check for some optional GPIO controls */
1262-
slot->vsd = gpiod_get_index_optional(host->dev, "vsd",
1263-
id, GPIOD_OUT_LOW);
1262+
slot->vsd = devm_gpiod_get_index_optional(host->dev, "vsd",
1263+
id, GPIOD_OUT_LOW);
12641264
if (IS_ERR(slot->vsd))
12651265
return dev_err_probe(host->dev, PTR_ERR(slot->vsd),
12661266
"error looking up VSD GPIO\n");
1267-
slot->vio = gpiod_get_index_optional(host->dev, "vio",
1268-
id, GPIOD_OUT_LOW);
1267+
slot->vio = devm_gpiod_get_index_optional(host->dev, "vio",
1268+
id, GPIOD_OUT_LOW);
12691269
if (IS_ERR(slot->vio))
12701270
return dev_err_probe(host->dev, PTR_ERR(slot->vio),
12711271
"error looking up VIO GPIO\n");
1272-
slot->cover = gpiod_get_index_optional(host->dev, "cover",
1273-
id, GPIOD_IN);
1272+
slot->cover = devm_gpiod_get_index_optional(host->dev, "cover",
1273+
id, GPIOD_IN);
12741274
if (IS_ERR(slot->cover))
12751275
return dev_err_probe(host->dev, PTR_ERR(slot->cover),
12761276
"error looking up cover switch GPIO\n");
@@ -1402,8 +1402,8 @@ static int mmc_omap_probe(struct platform_device *pdev)
14021402
host->dev = &pdev->dev;
14031403
platform_set_drvdata(pdev, host);
14041404

1405-
host->slot_switch = gpiod_get_optional(host->dev, "switch",
1406-
GPIOD_OUT_LOW);
1405+
host->slot_switch = devm_gpiod_get_optional(host->dev, "switch",
1406+
GPIOD_OUT_LOW);
14071407
if (IS_ERR(host->slot_switch))
14081408
return dev_err_probe(host->dev, PTR_ERR(host->slot_switch),
14091409
"error looking up slot switch GPIO\n");

0 commit comments

Comments
 (0)