mmc: mxs-mmc: adopt pinctrl support
authorShawn Guo <shawn.guo@linaro.org>
Sun, 6 May 2012 14:56:16 +0000 (22:56 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Sat, 12 May 2012 01:43:15 +0000 (09:43 +0800)
Cc: linux-mmc@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/mxs-mmc.c

index e3f5af96ab87f325942075ecba8705d137776c0c..bb03ddda481d659bb8aeee6d348bf5a33908e7c3 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/module.h>
 #include <linux/fsl/mxs-dma.h>
+#include <linux/pinctrl/consumer.h>
 
 #include <mach/mxs.h>
 #include <mach/common.h>
@@ -682,6 +683,7 @@ static int mxs_mmc_probe(struct platform_device *pdev)
        struct mmc_host *mmc;
        struct resource *iores, *dmares, *r;
        struct mxs_mmc_platform_data *pdata;
+       struct pinctrl *pinctrl;
        int ret = 0, irq_err, irq_dma;
        dma_cap_mask_t mask;
 
@@ -719,6 +721,12 @@ static int mxs_mmc_probe(struct platform_device *pdev)
        host->irq = irq_err;
        host->sdio_irq_en = 0;
 
+       pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+       if (IS_ERR(pinctrl)) {
+               ret = PTR_ERR(pinctrl);
+               goto out_iounmap;
+       }
+
        host->clk = clk_get(&pdev->dev, NULL);
        if (IS_ERR(host->clk)) {
                ret = PTR_ERR(host->clk);
This page took 0.024739 seconds and 5 git commands to generate.