From: Shawn Guo Date: Sun, 6 May 2012 12:21:05 +0000 (+0800) Subject: tty: serial: imx: adopt pinctrl support X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fed78ce4c6af1c0d516ae6f4cdc2bb8dbbca8c22;p=linux-beck.git tty: serial: imx: adopt pinctrl support Cc: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Shawn Guo Acked-by: Dong Aisheng --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index e7feceeebc2f..ec206732f68c 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -1464,6 +1465,7 @@ static int serial_imx_probe(struct platform_device *pdev) void __iomem *base; int ret = 0; struct resource *res; + struct pinctrl *pinctrl; sport = kzalloc(sizeof(*sport), GFP_KERNEL); if (!sport) @@ -1503,6 +1505,12 @@ static int serial_imx_probe(struct platform_device *pdev) sport->timer.function = imx_timeout; sport->timer.data = (unsigned long)sport; + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) { + ret = PTR_ERR(pinctrl); + goto unmap; + } + sport->clk = clk_get(&pdev->dev, "uart"); if (IS_ERR(sport->clk)) { ret = PTR_ERR(sport->clk);