serial/imx: improve error diagnosics for clock and pinctrl failures
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 20 Aug 2012 07:57:04 +0000 (09:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2012 20:15:07 +0000 (13:15 -0700)
These error paths are used more often now after deep changes to the
clock code and pinctrl is still new for imx. So help debugging and give
clues in the boot log.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index 20e911724027a1db5da67423235f1961f76c0077..72ec56e6d42f571d8b5e117033cfa87c9d66d397 100644 (file)
@@ -1505,18 +1505,21 @@ static int serial_imx_probe(struct platform_device *pdev)
        pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
        if (IS_ERR(pinctrl)) {
                ret = PTR_ERR(pinctrl);
+               dev_err(&pdev->dev, "failed to get default pinctrl: %d\n", ret);
                goto unmap;
        }
 
        sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
        if (IS_ERR(sport->clk_ipg)) {
                ret = PTR_ERR(sport->clk_ipg);
+               dev_err(&pdev->dev, "failed to get ipg clk: %d\n", ret);
                goto unmap;
        }
 
        sport->clk_per = devm_clk_get(&pdev->dev, "per");
        if (IS_ERR(sport->clk_per)) {
                ret = PTR_ERR(sport->clk_per);
+               dev_err(&pdev->dev, "failed to get per clk: %d\n", ret);
                goto unmap;
        }