Skip to content

Commit

Permalink
Input: samsung-keypad - use of_match_ptr()
Browse files Browse the repository at this point in the history
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 <dmitry.torokhov@gmail.com>
  • Loading branch information
Tobias Klauser authored and Dmitry Torokhov committed Aug 22, 2012
1 parent 54ce165 commit f4d4661
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/input/keyboard/samsung-keypad.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,6 @@ static const struct of_device_id samsung_keypad_dt_match[] = {
{},
};
MODULE_DEVICE_TABLE(of, samsung_keypad_dt_match);
#else
#define samsung_keypad_dt_match NULL
#endif

static struct platform_device_id samsung_keypad_driver_ids[] = {
Expand All @@ -684,7 +682,7 @@ static struct platform_driver samsung_keypad_driver = {
.driver = {
.name = "samsung-keypad",
.owner = THIS_MODULE,
.of_match_table = samsung_keypad_dt_match,
.of_match_table = of_match_ptr(samsung_keypad_dt_match),
.pm = &samsung_keypad_pm_ops,
},
.id_table = samsung_keypad_driver_ids,
Expand Down

0 comments on commit f4d4661

Please sign in to comment.