]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/video/backlight/platform_lcd.c: add support for device tree based probe
authorJingoo Han <jg1.han@samsung.com>
Fri, 28 Sep 2012 00:20:19 +0000 (10:20 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:01:22 +0000 (14:01 +1000)
This patch adds the of_match_table to platform-lcd driver to be
probed when platform-lcd device node is found in the device tree.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/backlight/platform_lcd.c

index b6672340d6c78b2cac69e7665beb38f59450d6df..574d5eed960030dbdec8540b042bf8010be25f11 100644 (file)
@@ -145,6 +145,14 @@ static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
                        platform_lcd_resume);
 #endif
 
+#ifdef CONFIG_OF
+static const struct of_device_id platform_lcd_of_match[] = {
+       { .compatible = "platform-lcd" },
+       {},
+};
+MODULE_DEVICE_TABLE(of, platform_lcd_of_match);
+#endif
+
 static struct platform_driver platform_lcd_driver = {
        .driver         = {
                .name   = "platform-lcd",
@@ -152,6 +160,7 @@ static struct platform_driver platform_lcd_driver = {
 #ifdef CONFIG_PM
                .pm     = &platform_lcd_pm_ops,
 #endif
+               .of_match_table = of_match_ptr(platform_lcd_of_match),
        },
        .probe          = platform_lcd_probe,
        .remove         = __devexit_p(platform_lcd_remove),