From: "Gaëtan Carlier" <gcembed@gmail.com>
To: linux-fbdev@vger.kernel.org
Subject: [PATCH 1/1] video: imxfb: Driver depends on status of LCD class device
Date: Thu, 27 Mar 2014 15:20:36 +0000 [thread overview]
Message-ID: <1395933636-15704-1-git-send-email-gcembed@gmail.com> (raw)
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
reply other threads:[~2014-03-27 15:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395933636-15704-1-git-send-email-gcembed@gmail.com \
--to=gcembed@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).