Hi Steffen, On Tue, Dec 18, 2012 at 22:34:14, Steffen Trumtrar wrote: > Add helper to get fb_videomode from devicetree. > drivers/video/fbmon.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > include/linux/fb.h | 4 ++++ This breaks DaVinci (da8xx_omapl_defconfig), following change was required to get it build if OF_VIDEOMODE or/and FB_MODE_HELPERS is not defined. There may be better solutions, following was the one that was used by me to test this series. ---8<---------- 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); ---8<---------- > +#if IS_ENABLED(CONFIG_OF_VIDEOMODE) As _OF_VIDEOMODE is a bool type CONFIG, isn't, #ifdef CONFIG_OF_VIDEOMODE sufficient ? Regards Afzal _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel