Skip to content

Commit

Permalink
Input: altera_ps2 - 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 <dtor@mail.ru>
  • Loading branch information
Tobias Klauser authored and Dmitry Torokhov committed Mar 17, 2012
1 parent 4a53383 commit 14b5842
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/input/serio/altera_ps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

/*
Expand All @@ -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);
Expand Down

0 comments on commit 14b5842

Please sign in to comment.