Commit fa019ba4 authored by Yihao Han's avatar Yihao Han Committed by Pavel Machek

leds: tca6507: use swap() to make code cleaner

Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.
Signed-off-by: default avatarYihao Han <hanyihao@vivo.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 679f8652
......@@ -242,9 +242,7 @@ static int choose_times(int msec, int *c1p, int *c2p)
if (diff < 65536) {
int actual;
if (msec & 1) {
c1 = *c2p;
*c2p = *c1p;
*c1p = c1;
swap(*c2p, *c1p);
}
actual = time_codes[*c1p] + time_codes[*c2p];
if (*c1p < *c2p)
......
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