From: Daniel Mack Date: Mon, 15 Oct 2012 16:05:05 +0000 (+0530) Subject: mmc: omap_hsmmc: claim pinctrl at probe time X-Git-Tag: upstream/snapshot3+hdmi~6147^2~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46b76035c12140caeda64dfd2557557263a30039;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git mmc: omap_hsmmc: claim pinctrl at probe time This allows DT-driven board to set up the pin mux only when the driver is in use. Signed-off-by: Daniel Mack Acked-by: Linus Walleij Signed-off-by: Venkatraman S Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index fedd258..813ae0a 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -1725,6 +1726,7 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) const struct of_device_id *match; dma_cap_mask_t mask; unsigned tx_req, rx_req; + struct pinctrl *pinctrl; match = of_match_device(of_match_ptr(omap_mmc_of_match), &pdev->dev); if (match) { @@ -1928,6 +1930,11 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev) omap_hsmmc_disable_irq(host); + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) + dev_warn(&pdev->dev, + "pins are not configured from the driver\n"); + omap_hsmmc_protect_card(host); mmc_add_host(mmc);