From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Sun, 15 Mar 2015 20:57:08 +0200 Subject: [U-Boot] [PATCH 3/4] common/lcd_console: move single static variables into common (static) structure In-Reply-To: <1426078645-4901-4-git-send-email-oe5hpm@oevsv.at> References: <1426078645-4901-1-git-send-email-oe5hpm@oevsv.at> <1426078645-4901-4-git-send-email-oe5hpm@oevsv.at> Message-ID: <5505D604.8080702@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Hannes, On 03/11/2015 02:57 PM, Hannes Petermaier wrote: > From: Hannes Petermaier > > For coming implementation of lcd_console rotation, we will need some more > variables for holding information about framebuffer size, rotation, ... > > For better readability we catch all them into a common structure. > > Signed-off-by: Hannes Petermaier > Signed-off-by: Hannes Petermaier > --- > > common/lcd_console.c | 76 +++++++++++++++++++++++++------------------------- > 1 file changed, 38 insertions(+), 38 deletions(-) > > diff --git a/common/lcd_console.c b/common/lcd_console.c > index b7dda7a..cac77be 100644 > --- a/common/lcd_console.c > +++ b/common/lcd_console.c > @@ -11,48 +11,49 @@ > #include /* Get font data, width and height */ > > #define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length) > -#define CONSOLE_ROW_FIRST lcd_console_address > -#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * console_rows) > +#define CONSOLE_ROW_FIRST cons.lcd_address > +#define CONSOLE_SIZE (CONSOLE_ROW_SIZE * cons.rows) > > -static short console_curr_col; > -static short console_curr_row; > -static short console_cols; > -static short console_rows; > -static void *lcd_console_address; > +struct console_t { > + short curr_col, curr_row; > + short cols, rows; > + void *lcd_address; Can this be void *base_address? I think that's a bit more descriptive. Other than that, Acked-by: Nikita Kiryanov > +}; -- Regards, Nikita Kiryanov