summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Walleij2012-11-11 19:12:33 +0100
committerLinus Walleij2012-11-11 19:12:33 +0100
commite59d969f441fb8e25b30125bdf201153adc5a7e3 (patch)
treee18250fbc1bc9e2ca864292d2390325f8ac84c80 /drivers/tty
parentARM: SPEAr: Add plgpio node in device tree dtsi files (diff)
parentpinctrl: at91: Staticize non-exported symbols (diff)
downloadkernel-qcow2-linux-e59d969f441fb8e25b30125bdf201153adc5a7e3.tar.gz
kernel-qcow2-linux-e59d969f441fb8e25b30125bdf201153adc5a7e3.tar.xz
kernel-qcow2-linux-e59d969f441fb8e25b30125bdf201153adc5a7e3.zip
Merge branch 'at91' into devel
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/atmel_serial.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 3d7e1ee2fa57..65f891be12d1 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -39,6 +39,7 @@
#include <linux/atmel_pdc.h>
#include <linux/atmel_serial.h>
#include <linux/uaccess.h>
+#include <linux/pinctrl/consumer.h>
#include <asm/io.h>
#include <asm/ioctls.h>
@@ -1773,6 +1774,7 @@ static int __devinit 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));
@@ -1805,6 +1807,12 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
atmel_init_port(port, pdev);
+ 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)