Subject: Re: [PATCH] 8xx: add cpm_get_cpmp()

From: Marcelo Tosatti <[email-masked]>
Date: Sat, 6 Aug 2005 21:33:24 -0300

On Sat, Aug 06, 2005 at 08:42:44PM -0300, Aristeu Sergio Rozanski Filho wrote:
> > It already is exported, declared as
> > 
> > commproc.h:extern       cpm8xx_t        *cpmp;          /* Pointer to comm processor */
> > 
> > 
> > and many drivers use the pointer directly.
> > 
> > arch/ppc/8260_io/ drivers also use the same convention.
> > 
> > Not sure I see much advantage in changing it?
> but not with EXPORT_SYMBOL(). I noticed this while compiling i2c stuff
> as module. 

Then other modules suffer from the same problem - what if you EXPORT_SYMBOL(cpmp)? 

> also, I think it's better add a function to do this instead
> doing EXPORT_SYMBOL() in a variable.
> what you think?

Well it is better in theory because it hides details, but in practice
I'm not sure its worth it - the CPM pointer (along with the whole immap)
never changes during runtime.