Thread (4 messages) 4 messages, 3 authors, 2013-01-25

Re: [PATCH v16 RESEND 0/7] of: add display helper

From: Steffen Trumtrar <hidden>
Date: 2013-01-25 08:04:26
Also in: dri-devel, linux-devicetree, linux-media

Possibly related (same subject, not in this thread)

Hi Afzal,

On Thu, Jan 24, 2013 at 08:47:02AM +0000, Mohammed, Afzal wrote:
Hi Steffen,

On Thu, Jan 24, 2013 at 13:49:58, Steffen Trumtrar wrote:
quoted
Thanks. I'll use that opportunity for a v17 that is rebased onto 3.8-rc4.
As you are going to have a v17, if you can fold the diff[1]
(that I mentioned earlier) into the patch,
"fbmon: add of_videomode helpers", it would be helpful. 
I thought about it and I will not include that patch. Sorry.
In one of the previous versions of the series I had something like that and
it was suggested to remove it. If I leave it like it is, one gets a compile
time error like you do. And that is correct, because you shouldn't use the
function if you do not have of_videomode enabled. You should use one of the
underlying functions that are non-DT and called by of_get_fb_videomode.

Regards,
Steffen
quoted hunk ↗ jump to hunk
Regards
Afzal

[1]
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 58b9860..0ce30d1 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -716,9 +716,19 @@ extern void fb_destroy_modedb(struct fb_videomode *modedb);
 extern int fb_find_mode_cvt(struct fb_videomode *mode, int margins, int rb);
 extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
 
+#if defined(CONFIG_OF_VIDEOMODE) && defined(CONFIG_FB_MODE_HELPERS)
 extern int of_get_fb_videomode(struct device_node *np,
                               struct fb_videomode *fb,
                               int index);
+#else
+static inline int of_get_fb_videomode(struct device_node *np,
+                                     struct fb_videomode *fb,
+                                     int index)
+{
+       return -EINVAL;
+}
+#endif
+
 extern int fb_videomode_from_videomode(const struct videomode *vm,
                                       struct fb_videomode *fbmode);
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help