On Wed, Dec 10, 2008 at 08:55:00PM -0700, Paul Walmsley wrote:
> Hi David,
>
> On Thu, 23 Oct 2008, David Brownell wrote:
>
> > On Saturday 18 October 2008, Paul Walmsley wrote:
> > > --- a/arch/arm/mach-omap2/omapdev-common.h
> > > +++ b/arch/arm/mach-omap2/omapdev-common.h
> > > @@ -21,6 +21,87 @@
> > > #include "omapdev3xxx.h"
> > >
> > > static struct omapdev *omapdevs[] = {
> > > +
> > > +#ifdef CONFIG_ARCH_OMAP2420
> > > + &mpu_242x_omapdev,
> > > + &iva_242x_omapdev,
> > > + &gfx_242x_omapdev,
> > > ...
> >
> > Urgh, this is unpleasant style: declaration of a large
> > static data structure in a header file.
> >
> > Cleaner: just have some omap2420-specific C file declare
> > the struct, and hand it off to whatever code uses it.
>
> Not sure I understand what you'd like to see. Could you send a short code
> snippet as an example? One caveat is that whatever we go with here will
> need to work for a multi-OMAP kernel.
I think dave is saying that you could move static struct omapdev to a
C-file and probably have separate tables for each omap version, then you
can pass a reference to it to a function which would do all the magic.
Something like platform_add_devices(), then you pass the reference to
the table and the table size.
--
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html