diff options
author | Ben Dooks <ben-linux@fluff.org> | 2011-08-03 05:11:43 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-09-29 21:31:48 -0400 |
commit | 85888069cf5d0f21312e3ee730458a5e3a553509 (patch) | |
tree | cc5a7d07524c0f200e671749efea663a991c2f58 /drivers/tty | |
parent | 3a1e362e3f3cd571b3974b8d44b8e358ec7a098c (diff) |
tty: use of_match_ptr() for of_match_table entry
Use the new of_match_ptr() macro for the of_match_table
pointer entry to avoid having to #dfine match NULL
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/altera_jtaguart.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/altera_uart.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/uartlite.c | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c index 60e049b041a7..207520069256 100644 --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c | |||
@@ -472,8 +472,6 @@ static struct of_device_id altera_jtaguart_match[] = { | |||
472 | {}, | 472 | {}, |
473 | }; | 473 | }; |
474 | MODULE_DEVICE_TABLE(of, altera_jtaguart_match); | 474 | MODULE_DEVICE_TABLE(of, altera_jtaguart_match); |
475 | #else | ||
476 | #define altera_jtaguart_match NULL | ||
477 | #endif /* CONFIG_OF */ | 475 | #endif /* CONFIG_OF */ |
478 | 476 | ||
479 | static struct platform_driver altera_jtaguart_platform_driver = { | 477 | static struct platform_driver altera_jtaguart_platform_driver = { |
@@ -482,7 +480,7 @@ static struct platform_driver altera_jtaguart_platform_driver = { | |||
482 | .driver = { | 480 | .driver = { |
483 | .name = DRV_NAME, | 481 | .name = DRV_NAME, |
484 | .owner = THIS_MODULE, | 482 | .owner = THIS_MODULE, |
485 | .of_match_table = altera_jtaguart_match, | 483 | .of_match_table = of_match_ptr(altera_jtaguart_match), |
486 | }, | 484 | }, |
487 | }; | 485 | }; |
488 | 486 | ||
diff --git a/drivers/tty/serial/altera_uart.c b/drivers/tty/serial/altera_uart.c index 50bc5a5ac653..0abd31d2361b 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 | }; |
618 | MODULE_DEVICE_TABLE(of, altera_uart_match); | 618 | MODULE_DEVICE_TABLE(of, altera_uart_match); |
619 | #else | ||
620 | #define altera_uart_match NULL | ||
621 | #endif /* CONFIG_OF */ | 619 | #endif /* CONFIG_OF */ |
622 | 620 | ||
623 | static struct platform_driver altera_uart_platform_driver = { | 621 | static 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/uartlite.c b/drivers/tty/serial/uartlite.c index 8af1ed83a4c0..0aed022d21b7 100644 --- a/drivers/tty/serial/uartlite.c +++ b/drivers/tty/serial/uartlite.c | |||
@@ -568,8 +568,6 @@ static struct of_device_id ulite_of_match[] __devinitdata = { | |||
568 | {} | 568 | {} |
569 | }; | 569 | }; |
570 | MODULE_DEVICE_TABLE(of, ulite_of_match); | 570 | MODULE_DEVICE_TABLE(of, ulite_of_match); |
571 | #else /* CONFIG_OF */ | ||
572 | #define ulite_of_match NULL | ||
573 | #endif /* CONFIG_OF */ | 571 | #endif /* CONFIG_OF */ |
574 | 572 | ||
575 | static int __devinit ulite_probe(struct platform_device *pdev) | 573 | static int __devinit ulite_probe(struct platform_device *pdev) |
@@ -609,7 +607,7 @@ static struct platform_driver ulite_platform_driver = { | |||
609 | .driver = { | 607 | .driver = { |
610 | .owner = THIS_MODULE, | 608 | .owner = THIS_MODULE, |
611 | .name = "uartlite", | 609 | .name = "uartlite", |
612 | .of_match_table = ulite_of_match, | 610 | .of_match_table = of_match_ptr(ulite_of_match), |
613 | }, | 611 | }, |
614 | }; | 612 | }; |
615 | 613 | ||