Skip to contentSkip to conversation

backlight: platform_lcd: Remove DT compatibility string

PATCH In review Alexander Shiyan 2 participants 2 messages Mar 29, 2014 – Mar 31, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 backlight: platform_lcd: Remove DT compatibility string

Driver is written for using platform callback functions and it cannot be used without these functions, so having "platform-lcd" in the device tree do nothing. This patch removes DT compatibility string.

---
 drivers/video/backlight/platform_lcd.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/video/backlight/platform_lcd.c +0 -11
index c3d2e20..4afc21f 100644
@@ -16,8 +16,6 @@
 #include <linux/fb.h>
 #include <linux/backlight.h>
 #include <linux/lcd.h>
-#include <linux/of.h>
-#include <linux/slab.h>
 
 #include <video/platform_lcd.h>
 
@@ -137,20 +135,11 @@ static int platform_lcd_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
 			platform_lcd_resume);
 
-#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",
 		.owner	= THIS_MODULE,
 		.pm	= &platform_lcd_pm_ops,
-		.of_match_table = of_match_ptr(platform_lcd_of_match),
 	},
 	.probe		= platform_lcd_probe,
 };
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 24 lines

Driver is written for using platform callback functions and it cannot be used without these functions, so having "platform-lcd" in the device tree do nothing. This patch removes DT compatibility string.

---
 drivers/video/backlight/platform_lcd.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/video/backlight/platform_lcd.c +0 -2
index c3d2e20..4afc21f 100644
@@ -16,8 +16,6 @@
 #include <linux/fb.h>
 #include <linux/backlight.h>
 #include <linux/lcd.h>
-#include <linux/of.h>
-#include <linux/slab.h>
 
 #include <video/platform_lcd.h>
 
@@ -137,20 +135,11 @@ static int platform_lcd_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,

drivers/video/backlight/platform_lcd.c static int platform_lcd_resume(struct device *dev) · line 147

Quoted 10 lines
drivers/video/backlight/platform_lcd.c +0 -8
 			platform_lcd_resume);
 
-#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
-

Rather than remove DT support, we should look into what these call-back functions to and work to rid those instead. What exactly do these routines provide?

Quoted 9 lines
drivers/video/backlight/platform_lcd.c +0 -1
 static struct platform_driver platform_lcd_driver = {
 	.driver		= {
 		.name	= "platform-lcd",
 		.owner	= THIS_MODULE,
 		.pm	= &platform_lcd_pm_ops,
-		.of_match_table = of_match_ptr(platform_lcd_of_match),
 	},
 	.probe		= platform_lcd_probe,
 };
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog