On Sat, Nov 07, 2015 at 07:16:16PM -0800, Du Huanpeng wrote:
> replace font related variables with a struct pointer,
> font_desc.
> 
> Signed-off-by: Du Huanpeng <[email protected]>
> ---
>  drivers/video/fbconsole.c | 36 +++++++++++++++++-------------------
>  1 file changed, 17 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> index b10503e..60f3c48 100644
> --- a/drivers/video/fbconsole.c
> +++ b/drivers/video/fbconsole.c
> @@ -22,8 +22,8 @@ struct fbc_priv {
>       struct param_d *par_font;
>       int par_font_val;
>  
> -     int font_width, font_height;
> -     const u8 *fontdata;
> +     const struct font_desc *font;
> +
>       unsigned int cols, rows;
>       unsigned int x, y; /* cursor position */
>  
> @@ -97,7 +97,7 @@ static void drawchar(struct fbc_priv *priv, int x, int y, 
> char c)
>  
>       buf = gui_screen_render_buffer(priv->sc);
>  
> -     inbuf = &priv->fontdata[c * priv->font_height];
> +     inbuf = &priv->font->data[c * priv->font->height];

I replaced this with:

        inbuf = priv->font->data + c * priv->font->height;

Otherwise we get:

drivers/video/fbconsole.c:100:27: warning: dereferencing 'void *' pointer

but otherwise: Applied, thanks

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to