[U-Boot] [PATCH] bmp: Respect "splashpos" if it is defined

Otavio Salvador otavio at ossystems.com.br
Tue Jul 2 00:25:32 CEST 2013


On Mon, Jul 1, 2013 at 7:01 PM, Anatolij Gustschin <agust at denx.de> wrote:
> Hello Otavio,
>
> Sorry for delay.
>
> On Thu,  6 Jun 2013 14:57:23 -0300
> Otavio Salvador <otavio at ossystems.com.br> wrote:
> ...
>> +#ifdef CONFIG_SPLASH_SCREEN_ALIGN
>> +     s = getenv("splashpos");
>> +     if (s != NULL) {
>> +             if (s[0] == 'm')
>> +                     x = BMP_ALIGN_CENTER;
>> +             else
>> +                     x = simple_strtol(s, NULL, 0);
>> +
>> +             s = strchr(s + 1, ',');
>> +             if (s != NULL) {
>> +                     if (s[1] == 'm')
>> +                             y = BMP_ALIGN_CENTER;
>> +                     else
>> +                             y = simple_strtol(s + 1, NULL, 0);
>> +             }
>> +     }
>> +#endif /* CONFIG_SPLASH_SCREEN_ALIGN */
>
> This code is already there in two other drivers, we should better
> add a common function for "splashpos" checking and use it here.
> I'll submit a patch shortly.

Agreed; I just acked the patch ... it looks great, thanks!

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


More information about the U-Boot mailing list