]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i2c: tegra: use of_match_ptr() for match_table initialization
authorLaxman Dewangan <ldewangan@nvidia.com>
Tue, 10 Jul 2012 11:20:42 +0000 (16:50 +0530)
committerWolfram Sang <w.sang@pengutronix.de>
Thu, 12 Jul 2012 09:41:55 +0000 (11:41 +0200)
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>
drivers/i2c/busses/i2c-tegra.c

index 60d777027ce8d082236b66a4808ce61128fe17b4..f00649c78b05fe92ef46790cff4840839ccc249d 100644 (file)
@@ -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 = {
@@ -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),
        },
 };