[PATCH] input: altera_ps2: Use of_match_ptr

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE5252d

2 messages, 2 authors, 2012-03-17 · open the first message on its own page

[PATCH] input: altera_ps2: Use of_match_ptr

From: Tobias Klauser <tklauser@distanz.ch>
Date: 2012-03-07 13:48:09

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>
---
 drivers/input/serio/altera_ps2.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index 35864c6..cc11f4e 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -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);
-- 
1.7.5.4

Re: [PATCH] input: altera_ps2: Use of_match_ptr

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2012-03-17 06:32:17

On Wed, Mar 07, 2012 at 02:48:07PM +0100, Tobias Klauser wrote:
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.
Applied, thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help