Subject: Re: [PATCH 1/2] MPC52xx updates : sparse clean-ups

From: Sylvain Munaut <[email-masked]>
Date: Fri, 11 Mar 2005 21:47:40 +0100

Kumar Gala wrote:

>>
>>
>> diff -Nru a/arch/ppc/syslib/mpc52xx_pic.c 
>> b/arch/ppc/syslib/mpc52xx_pic.c
>> --- a/arch/ppc/syslib/mpc52xx_pic.c     2005-03-11 20:41:36 +01:00
>>  +++ b/arch/ppc/syslib/mpc52xx_pic.c     2005-03-11 20:41:36 +01:00
>>  @@ -33,8 +33,8 @@
>>   #include <asm/mpc52xx.h>
>>
>>
>>
>> -static struct mpc52xx_intr *intr;
>>  -static struct mpc52xx_sdma *sdma;
>>  +static struct mpc52xx_intr __iomem *intr;
>>  +static struct mpc52xx_sdma __iomem *sdma;
>>
>>  static void
>>   mpc52xx_ic_disable(unsigned int irq)
>>  @@ -173,7 +173,7 @@
>>          mpc52xx_ic_disable,             /* disable(irq) */
>>         mpc52xx_ic_disable_and_ack,     /* disable_and_ack(irq) */
>>          mpc52xx_ic_end,                 /* end(irq) */
>>  -       0                               /* set_affinity(irq, cpumask)
>> SMP. */
>>  +       NULL                            /* set_affinity(irq, cpumask)
>> SMP. */
>>   };
>
>
> It looks like others have moved to a C99 initialization style for 
> hw_interrupt_type, see syslib/ipic.c for an example.
>

Indeed. Here's a third patch ;)
It has been added to the bk tree as well.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/03/11 21:37:08+01:00 [email-masked]
#   ppc32: Change to a C99 initialization style for hw_interrupt_type
#          in MPC52xx interrupt controller
#
# arch/ppc/syslib/mpc52xx_pic.c
#   2005/03/11 21:36:54+01:00 [email-masked] +5 -8
#   ppc32: Change to a C99 initialization style for hw_interrupt_type
#          in MPC52xx interrupt controller
#
diff -Nru a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c
--- a/arch/ppc/syslib/mpc52xx_pic.c     2005-03-11 21:45:50 +01:00
+++ b/arch/ppc/syslib/mpc52xx_pic.c     2005-03-11 21:45:50 +01:00
@@ -166,14 +166,11 @@
 }
 
 static struct hw_interrupt_type mpc52xx_ic = {
-       "MPC52xx",
-       NULL,                           /* startup(irq) */
-       NULL,                           /* shutdown(irq) */
-       mpc52xx_ic_enable,              /* enable(irq) */
-       mpc52xx_ic_disable,             /* disable(irq) */
-       mpc52xx_ic_disable_and_ack,     /* disable_and_ack(irq) */
-       mpc52xx_ic_end,                 /* end(irq) */
-       NULL                            /* set_affinity(irq, cpumask) 
SMP. */
+       .typename       = "MPC52xx",
+       .enable         = mpc52xx_ic_enable,
+       .disable        = mpc52xx_ic_disable,
+       .ack            = mpc52xx_ic_disable_and_ack,
+       .end            = mpc52xx_ic_end,
 };
 
 void __init