Skip to contentSkip to conversation

Input: twl6040 - do not define OF match table without CONFIG_OF

PATCH New Dmitry Torokhov 1 participant 1 message May 11, 2012

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: twl6040 - do not define OF match table without CONFIG_OF

---
 drivers/input/misc/twl6040-vibra.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/input/misc/twl6040-vibra.c +3 -1
index c34f6c0..7cf73ce 100644
@@ -418,11 +418,13 @@ static int __devexit twl6040_vibra_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
 static const struct of_device_id twl6040_vibra_of_match[] = {
 	{.compatible = "ti,twl6040-vibra", },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, twl6040_vibra_of_match);
+#endif
 
 static struct platform_driver twl6040_vibra_driver = {
 	.probe		= twl6040_vibra_probe,
@@ -431,7 +433,7 @@ static struct platform_driver twl6040_vibra_driver = {
 		.name	= "twl6040-vibra",
 		.owner	= THIS_MODULE,
 		.pm	= &twl6040_vibra_pm_ops,
-		.of_match_table = twl6040_vibra_of_match,
+		.of_match_table = of_match_ptr(twl6040_vibra_of_match),
 	},
 };
 module_platform_driver(twl6040_vibra_driver);
Signature · 5 lines
1.7.7.6


-- 
Dmitry