# Re: \[PATCH 05/15\] fbdev: imsttfb: remove the dependency on PPC\_OF

- From: Kevin Hao \<hidden\>
- Date: 2015-02-03 02:20:13 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2015/02/9482338
- Thread: https://ratatoskr.run/linux-fbdev/2015/01/9482311/t.md

```text
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
```

## Attachments

- [(unnamed)](https://ratatoskr.run/linux-fbdev/2015/02/9482338/attachment/0) (application/pgp-signature, 473 bytes)
