tty: use of_match_ptr() for of_match_table entry
authorBen Dooks <ben-linux@fluff.org>
Wed, 3 Aug 2011 09:11:43 +0000 (10:11 +0100)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 30 Sep 2011 01:31:48 +0000 (19:31 -0600)
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>
drivers/tty/serial/altera_jtaguart.c
drivers/tty/serial/altera_uart.c
drivers/tty/serial/uartlite.c

index 60e049b041a7a9425ec95db6689ab575e0fbbad2..2075200692562bac0a84d11a7bccff90ac83cb42 100644 (file)
@@ -472,8 +472,6 @@ static struct of_device_id altera_jtaguart_match[] = {
        {},
 };
 MODULE_DEVICE_TABLE(of, altera_jtaguart_match);
-#else
-#define altera_jtaguart_match NULL
 #endif /* CONFIG_OF */
 
 static struct platform_driver altera_jtaguart_platform_driver = {
@@ -482,7 +480,7 @@ static struct platform_driver altera_jtaguart_platform_driver = {
        .driver = {
                .name           = DRV_NAME,
                .owner          = THIS_MODULE,
-               .of_match_table = altera_jtaguart_match,
+               .of_match_table = of_match_ptr(altera_jtaguart_match),
        },
 };
 
index 50bc5a5ac6533af4d9efceb1e21882eb489914ac..0abd31d2361b202b4cbd08be3dcc8ea9d18943f8 100644 (file)
@@ -616,8 +616,6 @@ static struct of_device_id altera_uart_match[] = {
        {},
 };
 MODULE_DEVICE_TABLE(of, altera_uart_match);
-#else
-#define altera_uart_match NULL
 #endif /* CONFIG_OF */
 
 static struct platform_driver altera_uart_platform_driver = {
@@ -626,7 +624,7 @@ static struct platform_driver altera_uart_platform_driver = {
        .driver = {
                .name           = DRV_NAME,
                .owner          = THIS_MODULE,
-               .of_match_table = altera_uart_match,
+               .of_match_table = of_match_ptr(altera_uart_match),
        },
 };
 
index 8af1ed83a4c090590cf09d6f737e5520934f18b1..0aed022d21b72e62d03660ffbf9b14dd79d612e0 100644 (file)
@@ -568,8 +568,6 @@ static struct of_device_id ulite_of_match[] __devinitdata = {
        {}
 };
 MODULE_DEVICE_TABLE(of, ulite_of_match);
-#else /* CONFIG_OF */
-#define ulite_of_match NULL
 #endif /* CONFIG_OF */
 
 static int __devinit ulite_probe(struct platform_device *pdev)
@@ -609,7 +607,7 @@ static struct platform_driver ulite_platform_driver = {
        .driver = {
                .owner = THIS_MODULE,
                .name  = "uartlite",
-               .of_match_table = ulite_of_match,
+               .of_match_table = of_match_ptr(ulite_of_match),
        },
 };