[PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF

Kevin Hao haokexin at gmail.com
Tue Feb 3 13:20:02 AEDT 2015


On Sun, Feb 01, 2015 at 01:51:50PM +0800, Kevin Hao wrote:
> > > diff --git a/drivers/video/fbdev/imsttfb.c b/drivers/video/fbdev/imsttfb.c
> > > index aae10ce74f14..91a80bb8f988 100644
> > > --- a/drivers/video/fbdev/imsttfb.c
> > > +++ b/drivers/video/fbdev/imsttfb.c
> > > @@ -1470,7 +1470,6 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> > >  	unsigned long addr, size;
> > >  	struct imstt_par *par;
> > >  	struct fb_info *info;
> > > -#ifdef CONFIG_PPC_OF
> > >  	struct device_node *dp;
> > 
> > I see no way in this file for struct device_node to be defined
> > (especially if CONFIG_PPC is not set).  of.h may be included
> > implicitly, but that is very dependent on the architecture and CONFIG_
> > options.
> 
> This do pass the build test for the non-OF archs, such as x86. But your
> concerns sound pretty reasonable, so I will explicitly include of.h.

I took a second look at this. It seems that there is a declaration of
struct device_node in linux/device.h and there is also no access to the
member of device_node in this driver. So we are safe to not include of.h here.
That is also why I didn't get the build failure for the non-OF archs. :-)

Thanks,
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20150203/7dca6c45/attachment.sig>


More information about the Linuxppc-dev mailing list