mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 00:40:03 +00:00
video: fbmem: use swap() to make code cleaner in fb_rotate_logo()
Use swap() in order to make code cleaner. Issue found by coccinelle. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
5c6f402bdc
commit
0a78659695
1 changed files with 2 additions and 6 deletions
|
@ -396,18 +396,14 @@ static void fb_rotate_logo(struct fb_info *info, u8 *dst,
|
|||
} else if (rotate == FB_ROTATE_CW) {
|
||||
fb_rotate_logo_cw(image->data, dst, image->width,
|
||||
image->height);
|
||||
tmp = image->width;
|
||||
image->width = image->height;
|
||||
image->height = tmp;
|
||||
swap(image->width, image->height);
|
||||
tmp = image->dy;
|
||||
image->dy = image->dx;
|
||||
image->dx = info->var.xres - image->width - tmp;
|
||||
} else if (rotate == FB_ROTATE_CCW) {
|
||||
fb_rotate_logo_ccw(image->data, dst, image->width,
|
||||
image->height);
|
||||
tmp = image->width;
|
||||
image->width = image->height;
|
||||
image->height = tmp;
|
||||
swap(image->width, image->height);
|
||||
tmp = image->dx;
|
||||
image->dx = image->dy;
|
||||
image->dy = info->var.yres - image->height - tmp;
|
||||
|
|
Loading…
Reference in a new issue