[U-Boot] [PATCH] common/lcd.c: cleanup use of global variables

Anatolij Gustschin agust at denx.de
Mon Jan 7 00:33:29 CET 2013


Hello Wolfgang,

On Sat, 05 Jan 2013 20:50:01 +0100
Wolfgang Denk <wd at denx.de> wrote:

> Dear Anatolij,
> 
> In message <1357415148-9243-1-git-send-email-wd at denx.de> you wrote:
> > lcd_color_fg and lcd_color_bg had to be declared in board specific
> > code, but were not actually used there; in addition, we have getter /
> > setter functions for these, which were not used either.
> > 
> > Get rid of the global variables, and use the getter function where
> > needed (so far no setter calls are needed).
> 
> A similar change could (and probably should?) be implemented for
> lcd_base, too - but thjis requires a little more code changes, plus
> the introduction of both getter and setter functions.
> 
> Do you think this should be done?  If so, I would prepare a patch...

it should be done. And we probably do not need getter and setter
functions, we can use gd->fb_addr directly. lcd_base is set to the
value of gd->fb_base.

Thanks,
Anatolij


More information about the U-Boot mailing list