m68k: amiga: Clean up Amiga hardware configuration

Move the generic Amiga hardware configuration section out of the
switch statement, which allows to replace all ugly jumps by break
statements.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20200826125124.23863-1-geert@linux-m68k.org
This commit is contained in:
Geert Uytterhoeven 2020-08-26 14:51:24 +02:00
parent 62148d9859
commit d473de0f88
1 changed files with 58 additions and 60 deletions

View File

@ -214,7 +214,7 @@ static void __init amiga_identify(void)
switch (amiga_model) {
case AMI_UNKNOWN:
goto Generic;
break;
case AMI_600:
case AMI_1200:
@ -227,7 +227,7 @@ static void __init amiga_identify(void)
case AMI_2000:
case AMI_2500:
AMIGAHW_SET(A2000_CLK); /* Is this correct for all models? */
goto Generic;
break;
case AMI_3000:
case AMI_3000T:
@ -238,7 +238,7 @@ static void __init amiga_identify(void)
AMIGAHW_SET(A3000_SCSI);
AMIGAHW_SET(A3000_CLK);
AMIGAHW_SET(ZORRO3);
goto Generic;
break;
case AMI_4000T:
AMIGAHW_SET(A4000_SCSI);
@ -247,15 +247,21 @@ static void __init amiga_identify(void)
AMIGAHW_SET(A4000_IDE);
AMIGAHW_SET(A3000_CLK);
AMIGAHW_SET(ZORRO3);
goto Generic;
break;
case AMI_CDTV:
case AMI_CD32:
AMIGAHW_SET(CD_ROM);
AMIGAHW_SET(A2000_CLK); /* Is this correct? */
goto Generic;
break;
case AMI_DRACO:
panic("No support for Draco yet");
default:
panic("Unknown Amiga Model");
}
Generic:
AMIGAHW_SET(AMI_VIDEO);
AMIGAHW_SET(AMI_BLITTER);
AMIGAHW_SET(AMI_AUDIO);
@ -309,14 +315,6 @@ static void __init amiga_identify(void)
break;
}
AMIGAHW_SET(ZORRO);
break;
case AMI_DRACO:
panic("No support for Draco yet");
default:
panic("Unknown Amiga Model");
}
#define AMIGAHW_ANNOUNCE(name, str) \
if (AMIGAHW_PRESENT(name)) \