linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] video: imxfb: Driver depends on status of LCD class device
@ 2014-03-27 15:20 Gaëtan Carlier
  0 siblings, 0 replies; only message in thread
From: Gaëtan Carlier @ 2014-03-27 15:20 UTC (permalink / raw)
  To: linux-fbdev

If LCD_CLASS_DEVICE is disabled, symbol devm_lcd_device_register is
undefined

Signed-off-by: Gaëtan Carlier <gcembed@gmail.com>
---
 drivers/video/fbdev/imxfb.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index f6e6216..b979b61 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -30,7 +30,9 @@
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#ifdef CONFIG_LCD_CLASS_DEVICE
 #include <linux/lcd.h>
+#endif
 #include <linux/math64.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
@@ -718,6 +720,7 @@ static int imxfb_of_read_mode(struct device *dev, struct device_node *np,
 	return 0;
 }
 
+#ifdef CONFIG_LCD_CLASS_DEVICE
 static int imxfb_lcd_check_fb(struct lcd_device *lcddev, struct fb_info *fi)
 {
 	struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev);
@@ -785,6 +788,7 @@ static struct lcd_ops imxfb_lcd_ops = {
 	.get_power	= imxfb_lcd_get_power,
 	.set_power	= imxfb_lcd_set_power,
 };
+#endif
 
 static int imxfb_setup(void)
 {
@@ -809,7 +813,9 @@ static int imxfb_setup(void)
 static int imxfb_probe(struct platform_device *pdev)
 {
 	struct imxfb_info *fbi;
+#ifdef CONFIG_LCD_CLASS_DEVICE
 	struct lcd_device *lcd;
+#endif
 	struct fb_info *info;
 	struct imx_fb_platform_data *pdata;
 	struct resource *res;
@@ -967,6 +973,7 @@ static int imxfb_probe(struct platform_device *pdev)
 		goto failed_lcd;
 	}
 
+#ifdef CONFIG_LCD_CLASS_DEVICE
 	lcd = devm_lcd_device_register(&pdev->dev, "imxfb-lcd", &pdev->dev, fbi,
 				       &imxfb_lcd_ops);
 	if (IS_ERR(lcd)) {
@@ -975,6 +982,7 @@ static int imxfb_probe(struct platform_device *pdev)
 	}
 
 	lcd->props.max_contrast = 0xff;
+#endif
 
 	imxfb_enable_controller(fbi);
 	fbi->pdev = pdev;
-- 
1.7.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-27 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 15:20 [PATCH 1/1] video: imxfb: Driver depends on status of LCD class device Gaëtan Carlier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).