Re: [PATCH] Fixed OMAP3 version check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 25, 2008 at 01:17:51PM +0300, Tony Lindgren wrote:
> Hi,
> 
> * Tero Kristo <tero.kristo@xxxxxxxxx> [080916 14:59]:
> > CPU version was reported incorrectly (e.g. ES3.0 instead of ES2.1.)
> > Also added a piece of optimization for CPU type check (omap_type()).
> > 
> > Signed-off-by: Tero Kristo <tero.kristo@xxxxxxxxx>
> > ---
> >  arch/arm/mach-omap2/id.c |    7 +++++--
> >  1 files changed, 5 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
> > index ab7a6e9..4e2b449 100644
> > --- a/arch/arm/mach-omap2/id.c
> > +++ b/arch/arm/mach-omap2/id.c
> > @@ -37,7 +37,10 @@ EXPORT_SYMBOL(omap_chip_is);
> >  
> >  int omap_type(void)
> >  {
> > -	u32 val = 0;
> > +	static u32 val;
> > +
> > +	if (val != 0)
> > +		return val;
> 
> Hmm I guess this would return a random val? :)

it would return 0, look that val is static.


-- 
balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux