From: Jingoo Han Date: Wed, 26 Sep 2012 01:34:23 +0000 (+1000) Subject: drivers/video/backlight/platform_lcd.c: add support for device tree based probe X-Git-Tag: next-20120927~1^2~135 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=139dc15b40db5f74f829656f6f483336b8b3867c;p=karo-tx-linux.git drivers/video/backlight/platform_lcd.c: add support for device tree based probe 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 Cc: Richard Purdie Signed-off-by: Andrew Morton --- diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index b6672340d6c7..574d5eed9600 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -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),