aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-27 02:35:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-27 02:35:41 -0400
commit5fffb9513cb7fdd39e03c4cab1cda9c2f2694576 (patch)
treef28f1c232dd5774c9157ba257df37e66d4097870 /drivers/tty
parentb96d71571f7745216ef63f13770b5a10b94ddd34 (diff)
parentae97159aed6eff68f4ac86472b018985f071fed5 (diff)
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6: of_mdio: Don't phy_scan_fixups() twice Devicetree: Expand on ARM Primecell binding documentation dt: Add empty of_match_node() macro dt: add empty dt helpers for non-dt build devicetree: fix build error on drivers/tty/serial/altera_jtaguart.c devicetree: Add ARM pl022 spi controller binding doc devicetree: Add ARM pl061 gpio controller binding doc of/irq: of_irq_find_parent: check for parent equal to child MAINTAINERS: update devicetree maintainers dt: add helper to read 64-bit integers tty: use of_match_ptr() for of_match_table entry OF: Add of_match_ptr() macro dt: add empty for_each_child_of_node, of_find_property devicetree: Document Qualcomm and Atmel prefixes serial/imx: add of_alias_get_id() reference back dt: add of_alias_scan and of_alias_get_id devicetree: Add a registry of vendor prefixes
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/altera_jtaguart.c5
-rw-r--r--drivers/tty/serial/altera_uart.c4
-rw-r--r--drivers/tty/serial/imx.c11
-rw-r--r--drivers/tty/serial/uartlite.c4
4 files changed, 11 insertions, 13 deletions
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index 00a73ecb2dfb..530181e49f6b 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
@@ -18,6 +18,7 @@
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/console.h> 20#include <linux/console.h>
21#include <linux/of.h>
21#include <linux/tty.h> 22#include <linux/tty.h>
22#include <linux/tty_flip.h> 23#include <linux/tty_flip.h>
23#include <linux/serial.h> 24#include <linux/serial.h>
@@ -472,8 +473,6 @@ static struct of_device_id altera_jtaguart_match[] = {
472 {}, 473 {},
473}; 474};
474MODULE_DEVICE_TABLE(of, altera_jtaguart_match); 475MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
475#else
476#define altera_jtaguart_match NULL
477#endif /* CONFIG_OF */ 476#endif /* CONFIG_OF */
478 477
479static struct platform_driver altera_jtaguart_platform_driver = { 478static struct platform_driver altera_jtaguart_platform_driver = {
@@ -482,7 +481,7 @@ static struct platform_driver altera_jtaguart_platform_driver = {
482 .driver = { 481 .driver = {
483 .name = DRV_NAME, 482 .name = DRV_NAME,
484 .owner = THIS_MODULE, 483 .owner = THIS_MODULE,
485 .of_match_table = altera_jtaguart_match, 484 .of_match_table = of_match_ptr(altera_jtaguart_match),
486 }, 485 },
487}; 486};
488 487
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c
index d902558ccfd2..1d04c5037f25 100644
--- a/drivers/tty/serial/altera_uart.c
+++ b/drivers/tty/serial/altera_uart.c
@@ -616,8 +616,6 @@ static struct of_device_id altera_uart_match[] = {
616 {}, 616 {},
617}; 617};
618MODULE_DEVICE_TABLE(of, altera_uart_match); 618MODULE_DEVICE_TABLE(of, altera_uart_match);
619#else
620#define altera_uart_match NULL
621#endif /* CONFIG_OF */ 619#endif /* CONFIG_OF */
622 620
623static struct platform_driver altera_uart_platform_driver = { 621static struct platform_driver altera_uart_platform_driver = {
@@ -626,7 +624,7 @@ static struct platform_driver altera_uart_platform_driver = {
626 .driver = { 624 .driver = {
627 .name = DRV_NAME, 625 .name = DRV_NAME,
628 .owner = THIS_MODULE, 626 .owner = THIS_MODULE,
629 .of_match_table = altera_uart_match, 627 .of_match_table = of_match_ptr(altera_uart_match),
630 }, 628 },
631}; 629};
632 630
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 54ffdc6243f9..163fc9021f5a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1290,17 +1290,20 @@ static int serial_imx_resume(struct platform_device *dev)
1290static int serial_imx_probe_dt(struct imx_port *sport, 1290static int serial_imx_probe_dt(struct imx_port *sport,
1291 struct platform_device *pdev) 1291 struct platform_device *pdev)
1292{ 1292{
1293 static int portnum = 0;
1294 struct device_node *np = pdev->dev.of_node; 1293 struct device_node *np = pdev->dev.of_node;
1295 const struct of_device_id *of_id = 1294 const struct of_device_id *of_id =
1296 of_match_device(imx_uart_dt_ids, &pdev->dev); 1295 of_match_device(imx_uart_dt_ids, &pdev->dev);
1296 int ret;
1297 1297
1298 if (!np) 1298 if (!np)
1299 return -ENODEV; 1299 return -ENODEV;
1300 1300
1301 sport->port.line = portnum++; 1301 ret = of_alias_get_id(np, "serial");
1302 if (sport->port.line >= UART_NR) 1302 if (ret < 0) {
1303 return -EINVAL; 1303 dev_err(&pdev->dev, "failed to get alias id, errno %d\n", ret);
1304 return -ENODEV;
1305 }
1306 sport->port.line = ret;
1304 1307
1305 if (of_get_property(np, "fsl,uart-has-rtscts", NULL)) 1308 if (of_get_property(np, "fsl,uart-has-rtscts", NULL))
1306 sport->have_rtscts = 1; 1309 sport->have_rtscts = 1;
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index b908615ccaaf..6cd414341d5e 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -569,8 +569,6 @@ static struct of_device_id ulite_of_match[] __devinitdata = {
569 {} 569 {}
570}; 570};
571MODULE_DEVICE_TABLE(of, ulite_of_match); 571MODULE_DEVICE_TABLE(of, ulite_of_match);
572#else /* CONFIG_OF */
573#define ulite_of_match NULL
574#endif /* CONFIG_OF */ 572#endif /* CONFIG_OF */
575 573
576static int __devinit ulite_probe(struct platform_device *pdev) 574static int __devinit ulite_probe(struct platform_device *pdev)
@@ -610,7 +608,7 @@ static struct platform_driver ulite_platform_driver = {
610 .driver = { 608 .driver = {
611 .owner = THIS_MODULE, 609 .owner = THIS_MODULE,
612 .name = "uartlite", 610 .name = "uartlite",
613 .of_match_table = ulite_of_match, 611 .of_match_table = of_match_ptr(ulite_of_match),
614 }, 612 },
615}; 613};
616 614