i2c: tegra: use of_match_ptr() for match_table initialization
Laxman Dewangan [Tue, 10 Jul 2012 11:20:42 +0000 (16:20 +0530)]
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>

drivers/i2c/busses/i2c-tegra.c

index 1358dc7..ff31683 100644 (file)
@@ -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,
        },
 };