From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steffen Trumtrar Date: Fri, 25 Jan 2013 08:04:26 +0000 Subject: Re: [PATCH v16 RESEND 0/7] of: add display helper Message-Id: <20130125080426.GA6937@pengutronix.de> List-Id: References: <1358766482-6275-1-git-send-email-s.trumtrar@pengutronix.de> <20130123091202.GA11828@pengutronix.de> <20130124081958.GA28406@pengutronix.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "Mohammed, Afzal" Cc: Leela Krishna Amudala , "linux-fbdev@vger.kernel.org" , David Airlie , "devicetree-discuss@lists.ozlabs.org" , Florian Tobias Schandinat , "dri-devel@lists.freedesktop.org" , Rob Clark , "Valkeinen, Tomi" , Laurent Pinchart , "kernel@pengutronix.de" , Guennady Liakhovetski , "linux-media@vger.kernel.org" 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: > > > 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 > 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 |