Commit 5dcdc460 authored by Yang Guang's avatar Yang Guang Committed by Takashi Iwai

ALSA: hda: 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>
Link: https://lore.kernel.org/r/ebc9db44b802dfc88e1538629b517e000acb27b3.1639790796.git.yang.guang5@zte.com.cnSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 10f2f194
......@@ -92,14 +92,10 @@ static int compare_input_type(const void *ap, const void *bp)
*/
static void reorder_outputs(unsigned int nums, hda_nid_t *pins)
{
hda_nid_t nid;
switch (nums) {
case 3:
case 4:
nid = pins[1];
pins[1] = pins[2];
pins[2] = nid;
swap(pins[1], pins[2]);
break;
}
}
......
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