Input: altera_ps2 - use of_match_ptr()
authorTobias Klauser <tklauser@distanz.ch>
Sat, 17 Mar 2012 06:31:25 +0000 (23:31 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 17 Mar 2012 06:34:00 +0000 (23:34 -0700)
Instead of having to define the match table to NULL if CONFIG_OF isn't
set, use the of_match_ptr() macro which will do this for us.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/serio/altera_ps2.c

index 35864c6130bb0b5723eed9f2fcc8408868f36bef..cc11f4efe11935055967fe551a8af6ec1e999774 100644 (file)
@@ -180,8 +180,6 @@ static const struct of_device_id altera_ps2_match[] = {
        {},
 };
 MODULE_DEVICE_TABLE(of, altera_ps2_match);
-#else /* CONFIG_OF */
-#define altera_ps2_match NULL
 #endif /* CONFIG_OF */
 
 /*
@@ -193,7 +191,7 @@ static struct platform_driver altera_ps2_driver = {
        .driver = {
                .name   = DRV_NAME,
                .owner  = THIS_MODULE,
-               .of_match_table = altera_ps2_match,
+               .of_match_table = of_match_ptr(altera_ps2_match),
        },
 };
 module_platform_driver(altera_ps2_driver);