summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2012-07-10 16:50:42 +0530
committerSimone Willett <swillett@nvidia.com>2012-07-19 15:38:28 -0700
commit2f88a49dcde9f951459ed3ff92b62d03c0dcb690 (patch)
tree923562e3aa13910ff72d86267df8b94079a80329
parent20f4cdc91d6babfe87a2b196aac524a7855c4d55 (diff)
i2c: tegra: use of_match_ptr() for match_table initialization
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> Cherry-picked from mainline 02d8bf8dc6b09cb810599c64d47da3bdf4f85882 Fixed conflicts. Change-Id: I71994c49813396ad6b3dfa3fd616d9585203adba Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/116464 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com>
-rw-r--r--drivers/i2c/busses/i2c-tegra.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 1358dc70b0e4..ff31683fef32 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -1104,8 +1104,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 = {
@@ -1114,7 +1112,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),
.pm = TEGRA_I2C_DEV_PM_OPS,
},
};