drivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe
authorWolfram Sang <wsa@the-dreams.de>
Wed, 10 Jul 2013 15:57:46 +0000 (16:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jul 2013 22:21:13 +0000 (15:21 -0700)
Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for setting the default pins. Compile tested only.

Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c
drivers/tty/serial/imx.c
drivers/tty/serial/mxs-auart.c
drivers/tty/serial/omap-serial.c

index 691265faebbe608c555573513d4735be18c7d8e8..0e39facfcb07c549074d74342c720652ed3f657c 100644 (file)
@@ -39,7 +39,6 @@
 #include <linux/atmel_pdc.h>
 #include <linux/atmel_serial.h>
 #include <linux/uaccess.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/platform_data/atmel.h>
 
 #include <asm/io.h>
@@ -1775,7 +1774,6 @@ static int atmel_serial_probe(struct platform_device *pdev)
        struct atmel_uart_data *pdata = pdev->dev.platform_data;
        void *data;
        int ret = -ENODEV;
-       struct pinctrl *pinctrl;
 
        BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
 
@@ -1809,12 +1807,6 @@ static int atmel_serial_probe(struct platform_device *pdev)
        if (ret)
                goto err;
 
-       pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-       if (IS_ERR(pinctrl)) {
-               ret = PTR_ERR(pinctrl);
-               goto err;
-       }
-
        if (!atmel_use_dma_rx(&port->uart)) {
                ret = -ENOMEM;
                data = kmalloc(sizeof(struct atmel_uart_char)
index 415cec62073fbc61d9770e6a8c613a42f2ba6865..2797e55d9753a057592fe0280c3ef49239537618 100644 (file)
@@ -47,7 +47,6 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/io.h>
 
 #include <asm/irq.h>
@@ -1507,7 +1506,6 @@ static int serial_imx_probe(struct platform_device *pdev)
        void __iomem *base;
        int ret = 0;
        struct resource *res;
-       struct pinctrl *pinctrl;
 
        sport = devm_kzalloc(&pdev->dev, sizeof(*sport), GFP_KERNEL);
        if (!sport)
@@ -1543,13 +1541,6 @@ 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);
-               dev_err(&pdev->dev, "failed to get default pinctrl: %d\n", ret);
-               return ret;
-       }
-
        sport->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
        if (IS_ERR(sport->clk_ipg)) {
                ret = PTR_ERR(sport->clk_ipg);
index 4f5f161896a139852e46f93f30239be979838bda..a63a20e0d69d817c376613740cb015ca7d18d8bb 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/clk.h>
 #include <linux/delay.h>
 #include <linux/io.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/of_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/dmaengine.h>
@@ -1015,7 +1014,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
        u32 version;
        int ret = 0;
        struct resource *r;
-       struct pinctrl *pinctrl;
 
        s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
        if (!s) {
@@ -1029,12 +1027,6 @@ static int mxs_auart_probe(struct platform_device *pdev)
        else if (ret < 0)
                goto out_free;
 
-       pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-       if (IS_ERR(pinctrl)) {
-               ret = PTR_ERR(pinctrl);
-               goto out_free;
-       }
-
        if (of_id) {
                pdev->id_entry = of_id->data;
                s->devtype = pdev->id_entry->driver_data;
index b6d17287307636dd34afeb3e97fc4a491efe437c..eacb0def3d96f694b44ab81f5d339e54cbd971ac 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
 #include <linux/gpio.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/platform_data/serial-omap.h>
 
 #define OMAP_MAX_HSUART_PORTS  6
@@ -160,7 +159,6 @@ struct uart_omap_port {
        u32                     latency;
        u32                     calc_latency;
        struct work_struct      qos_work;
-       struct pinctrl          *pins;
        bool                    is_suspending;
 };
 
@@ -1468,13 +1466,6 @@ static int serial_omap_probe(struct platform_device *pdev)
                goto err_port_line;
        }
 
-       up->pins = devm_pinctrl_get_select_default(&pdev->dev);
-       if (IS_ERR(up->pins)) {
-               dev_warn(&pdev->dev, "did not get pins for uart%i error: %li\n",
-                        up->port.line, PTR_ERR(up->pins));
-               up->pins = NULL;
-       }
-
        sprintf(up->name, "OMAP UART%d", up->port.line);
        up->port.mapbase = mem->start;
        up->port.membase = devm_ioremap(&pdev->dev, mem->start,