summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2019-11-20 14:11:15 +0100
committerAnatolij Gustschin <agust@denx.de>2019-12-06 09:07:45 +0100
commit1ebf2855b486f7ff6dcac1ab953abbf68462ecad (patch)
treefa3e65172a0fcd05c8d924afe9fe00cd3013c60c /drivers
parent28a4516cf154d6f7e738f8e0519b41eccef5af5c (diff)
video: bmp: Fix video_splash_align_axis()
Convert panel_picture_delta and axis_alignment from unsigned long to long to insure to store correctly the difference between panel_size and picture_size in case the panel_size is smaller than picture_size. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> CC: Yannick Fertré <yannick.fertre@st.com> [agust: change axis_alignment to long] Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/video_bmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index 193f37d275..2c3d2e6e36 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -157,8 +157,8 @@ __weak void fb_put_word(uchar **fb, uchar **from)
static void video_splash_align_axis(int *axis, unsigned long panel_size,
unsigned long picture_size)
{
- unsigned long panel_picture_delta = panel_size - picture_size;
- unsigned long axis_alignment;
+ long panel_picture_delta = panel_size - picture_size;
+ long axis_alignment;
if (*axis == BMP_ALIGN_CENTER)
axis_alignment = panel_picture_delta / 2;