[PATCH 1/3 v2][MTD] P4080/eLBC: Make Freescale elbc interrupt common to elbc devices

Anton Vorontsov cbouatmailru at gmail.com
Fri Sep 10 19:31:13 EST 2010

On Fri, Sep 10, 2010 at 02:58:15PM +0800, Zang Roy-R61911 wrote:
> > > +static struct of_platform_driver fsl_lbc_ctrl_driver = {
> > 
> > Need linux/of_platform.h for this.
> It has been include by
> fsl_lbc.h->linux/of_platform.h-> linux/platform_device.h
> Before submitting the patch, I have built and tested it.

In Linux we try to include all the headers explicitly (except
for asm/* if the same header name exists in linux/).

That's to avoid problems if for some reason fsl_lbc.h will stop
including of_plaform.h some day.

Oh, and by the way, there is absolutely no reason to add
linux/of_platform.h and interrupts.h into fsl_lbc.h, they're
is simply not needed in fsl_lbc.h.

> Do you think I do not build the tree before I send out the patch?

Nope, that's not what I think. I didn't say that the file
won't build w/o these fixes, but they're still needed.

> > > +
> > > +static struct of_platform_driver fsl_lbc_ctrl_driver = {
> > 
> > Need linux/of_platform.h for this.
> > 
> > But you actually don't need of_platform_driver, as for the
> > new code you can use platform_driver (and thus
> > linux/platform_device.h).
> I'd prefer using of_platform_driver here for simplified code.
> Any special reason to use platform_device here?

In the new kernels, of_platform_driver is almost a synonym of
platform_driver, and 'of_platform_driver' stuff is soon to be
deleted. You can use platform_driver just like
of_platform_driver nowadays.


Anton Vorontsov
email: cbouatmailru at gmail.com

More information about the Linuxppc-dev mailing list