diff mbox series

[v2] s3c: Improve readability of bast_pc104_irqmask[]

Message ID 20220328204638.273157-1-benni@stuerz.xyz (mailing list archive)
State New
Headers show
Series [v2] s3c: Improve readability of bast_pc104_irqmask[] | expand

Commit Message

Benjamin Stürz March 28, 2022, 8:46 p.m. UTC
Replace comments in bast_pc104_irqmask[] with C99's designated
initializers because it makes the code cleaner and easier to read.

Signed-off-by: Benjamin Stürz <benni@stuerz.xyz>
---
 arch/arm/mach-s3c/bast-irq.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/mach-s3c/bast-irq.c b/arch/arm/mach-s3c/bast-irq.c
index d299f124e6dc..618b51db3eef 100644
--- a/arch/arm/mach-s3c/bast-irq.c
+++ b/arch/arm/mach-s3c/bast-irq.c
@@ -28,23 +28,11 @@ 
 /* table of ISA irq nos to the relevant mask... zero means
  * the irq is not implemented
 */
-static const unsigned char bast_pc104_irqmasks[] = {
-	0,   /* 0 */
-	0,   /* 1 */
-	0,   /* 2 */
-	1,   /* 3 */
-	0,   /* 4 */
-	2,   /* 5 */
-	0,   /* 6 */
-	4,   /* 7 */
-	0,   /* 8 */
-	0,   /* 9 */
-	8,   /* 10 */
-	0,   /* 11 */
-	0,   /* 12 */
-	0,   /* 13 */
-	0,   /* 14 */
-	0,   /* 15 */
+static const unsigned char bast_pc104_irqmasks[16] = {
+	[3]  = 1,
+	[5]  = 2,
+	[7]  = 4,
+	[10] = 8,
 };
 
 static const unsigned char bast_pc104_irqs[] = { 3, 5, 7, 10 };