Skip to content

Commit

Permalink
i2c: tegra: use of_match_ptr() for match_table initialization
Browse files Browse the repository at this point in the history
In place of defining match_table for non-DT based as NULL,
use of_match_ptr() for initialzing the of_match_table.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
  • Loading branch information
Laxman Dewangan authored and Wolfram Sang committed Jul 12, 2012
1 parent 9dce4bc commit 02d8bf8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/i2c/busses/i2c-tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,6 @@ static const struct of_device_id tegra_i2c_of_match[] __devinitconst = {
{},
};
MODULE_DEVICE_TABLE(of, tegra_i2c_of_match);
#else
#define tegra_i2c_of_match NULL
#endif

static struct platform_driver tegra_i2c_driver = {
Expand All @@ -768,7 +766,7 @@ static struct platform_driver tegra_i2c_driver = {
.driver = {
.name = "tegra-i2c",
.owner = THIS_MODULE,
.of_match_table = tegra_i2c_of_match,
.of_match_table = of_match_ptr(tegra_i2c_of_match),
},
};

Expand Down

0 comments on commit 02d8bf8

Please sign in to comment.