Commit 963e65db authored by Yang Guang's avatar Yang Guang Committed by Helge Deller

video: fbdev: sis: use swap() to make code cleaner

Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarDavid Yang <davidcomponentone@gmail.com>
Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 62d89a7d
......@@ -213,7 +213,7 @@ static void sisfb_search_mode(char *name, bool quiet)
/* This does some fuzzy mode naming detection */
if(sscanf(strbuf1, "%u %u %u %u", &xres, &yres, &depth, &rate) == 4) {
if((rate <= 32) || (depth > 32)) {
j = rate; rate = depth; depth = j;
swap(rate, depth);
}
sprintf(strbuf, "%ux%ux%u", xres, yres, depth);
nameptr = strbuf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment