上级 ec6754a7
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <linux/atmel_pdc.h> #include <linux/atmel_pdc.h>
#include <linux/atmel_serial.h> #include <linux/atmel_serial.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/pinctrl/consumer.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/ioctls.h> #include <asm/ioctls.h>
...@@ -1773,6 +1774,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) ...@@ -1773,6 +1774,7 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
struct atmel_uart_data *pdata = pdev->dev.platform_data; struct atmel_uart_data *pdata = pdev->dev.platform_data;
void *data; void *data;
int ret = -ENODEV; int ret = -ENODEV;
struct pinctrl *pinctrl;
BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1)); BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
...@@ -1805,6 +1807,12 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) ...@@ -1805,6 +1807,12 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
atmel_init_port(port, 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)) { if (!atmel_use_dma_rx(&port->uart)) {
ret = -ENOMEM; ret = -ENOMEM;
data = kmalloc(sizeof(struct atmel_uart_char) data = kmalloc(sizeof(struct atmel_uart_char)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册