]> Git Repo - linux.git/commitdiff
i2c-tegra: Add of_match_table
authorJohn Bonesio <[email protected]>
Tue, 30 Aug 2011 17:46:08 +0000 (11:46 -0600)
committerBen Dooks <[email protected]>
Tue, 6 Sep 2011 23:11:46 +0000 (00:11 +0100)
This patch was intended to be part of 7ca2d1a105a239e300b937e9c41a10a4bd08f569
"i2c: Tegra: Add DeviceTree support". However, an early version of that patch,
which was missing a chunk, was applied to next-i2c. This change is that
missing chunk.

Signed-off-by: John Bonesio <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Ben Dooks <[email protected]>
drivers/i2c/busses/i2c-tegra.c

index 2440b741197851247ea267cd8464467c925a4c72..126b4f06023131df2f1c761d079cfb77ee5d9310 100644 (file)
@@ -719,6 +719,17 @@ static int tegra_i2c_resume(struct platform_device *pdev)
 }
 #endif
 
+#if defined(CONFIG_OF)
+/* Match table for of_platform binding */
+static const struct of_device_id tegra_i2c_of_match[] __devinitconst = {
+       { .compatible = "nvidia,tegra20-i2c", },
+       {},
+};
+MODULE_DEVICE_TABLE(of, tegra_i2c_of_match);
+#else
+#define tegra_i2c_of_match NULL
+#endif
+
 static struct platform_driver tegra_i2c_driver = {
        .probe   = tegra_i2c_probe,
        .remove  = tegra_i2c_remove,
@@ -729,6 +740,7 @@ static struct platform_driver tegra_i2c_driver = {
        .driver  = {
                .name  = "tegra-i2c",
                .owner = THIS_MODULE,
+               .of_match_table = tegra_i2c_of_match,
        },
 };
 
This page took 0.060587 seconds and 4 git commands to generate.