sparc/irq: Use helper irq_data_get_irq_handler_data()
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 1 Jun 2015 08:05:17 +0000 (16:05 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 31 Jul 2015 20:20:05 +0000 (22:20 +0200)
Use helper function irq_data_get_irq_handler_data() to hide irq_desc
implementation details. This allows to move irq_data->handler_data to
irq_data_common, once all usage sites are converted.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/1433145945-789-9-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/sparc/kernel/irq_64.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/sun4m_irq.c

index 4033c23bdfa6cc76a9ef4b34ad671da39b6b5077..5130f6e3e68e87f285e7e6648e4bebc54e32928c 100644 (file)
@@ -210,21 +210,21 @@ struct irq_handler_data {
 
 static inline unsigned int irq_data_to_handle(struct irq_data *data)
 {
-       struct irq_handler_data *ihd = data->handler_data;
+       struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
 
        return ihd->dev_handle;
 }
 
 static inline unsigned int irq_data_to_ino(struct irq_data *data)
 {
-       struct irq_handler_data *ihd = data->handler_data;
+       struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
 
        return ihd->dev_ino;
 }
 
 static inline unsigned long irq_data_to_sysino(struct irq_data *data)
 {
-       struct irq_handler_data *ihd = data->handler_data;
+       struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
 
        return ihd->sysino;
 }
@@ -370,8 +370,9 @@ static int irq_choose_cpu(unsigned int irq, const struct cpumask *affinity)
 
 static void sun4u_irq_enable(struct irq_data *data)
 {
-       struct irq_handler_data *handler_data = data->handler_data;
+       struct irq_handler_data *handler_data;
 
+       handler_data = irq_data_get_irq_handler_data(data);
        if (likely(handler_data)) {
                unsigned long cpuid, imap, val;
                unsigned int tid;
@@ -393,8 +394,9 @@ static void sun4u_irq_enable(struct irq_data *data)
 static int sun4u_set_affinity(struct irq_data *data,
                               const struct cpumask *mask, bool force)
 {
-       struct irq_handler_data *handler_data = data->handler_data;
+       struct irq_handler_data *handler_data;
 
+       handler_data = irq_data_get_irq_handler_data(data);
        if (likely(handler_data)) {
                unsigned long cpuid, imap, val;
                unsigned int tid;
@@ -438,8 +440,9 @@ static void sun4u_irq_disable(struct irq_data *data)
 
 static void sun4u_irq_eoi(struct irq_data *data)
 {
-       struct irq_handler_data *handler_data = data->handler_data;
+       struct irq_handler_data *handler_data;
 
+       handler_data = irq_data_get_irq_handler_data(data);
        if (likely(handler_data))
                upa_writeq(ICLR_IDLE, handler_data->iclr);
 }
index a1bb2675b2801ac44891f3acf50320613e35a025..a87d0e47c1681dc2714cc52ebdcb98420880c172 100644 (file)
@@ -188,7 +188,7 @@ void sun4d_handler_irq(unsigned int pil, struct pt_regs *regs)
 
 static void sun4d_mask_irq(struct irq_data *data)
 {
-       struct sun4d_handler_data *handler_data = data->handler_data;
+       struct sun4d_handler_data *handler_data = irq_data_get_irq_handler_data(data);
        unsigned int real_irq;
 #ifdef CONFIG_SMP
        int cpuid = handler_data->cpuid;
@@ -206,7 +206,7 @@ static void sun4d_mask_irq(struct irq_data *data)
 
 static void sun4d_unmask_irq(struct irq_data *data)
 {
-       struct sun4d_handler_data *handler_data = data->handler_data;
+       struct sun4d_handler_data *handler_data = irq_data_get_irq_handler_data(data);
        unsigned int real_irq;
 #ifdef CONFIG_SMP
        int cpuid = handler_data->cpuid;
index 8bb3b3fddea71dfe73cfee142b371c8d7e531660..da737c712fa89b3d9809c3ac7bd8a14cbcbeb415 100644 (file)
@@ -188,9 +188,10 @@ static unsigned long sun4m_imask[0x50] = {
 
 static void sun4m_mask_irq(struct irq_data *data)
 {
-       struct sun4m_handler_data *handler_data = data->handler_data;
+       struct sun4m_handler_data *handler_data;
        int cpu = smp_processor_id();
 
+       handler_data = irq_data_get_irq_handler_data(data);
        if (handler_data->mask) {
                unsigned long flags;
 
@@ -206,9 +207,10 @@ static void sun4m_mask_irq(struct irq_data *data)
 
 static void sun4m_unmask_irq(struct irq_data *data)
 {
-       struct sun4m_handler_data *handler_data = data->handler_data;
+       struct sun4m_handler_data *handler_data;
        int cpu = smp_processor_id();
 
+       handler_data = irq_data_get_irq_handler_data(data);
        if (handler_data->mask) {
                unsigned long flags;