lkml.org 
[lkml]   [2010]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 15/19] genirq; Provide compat handling for chip->set_wake()
Wrap the old chip function set_wake() until the migration is complete
and the old chip functions are removed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/chip.c | 7 +++++++
kernel/irq/manage.c | 4 ++--
2 files changed, 9 insertions(+), 2 deletions(-)

Index: linux-2.6-tip/kernel/irq/chip.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/chip.c
+++ linux-2.6-tip/kernel/irq/chip.c
@@ -384,6 +384,11 @@ static int compat_irq_set_type(struct ir
return irq_data_to_desc(data)->chip->set_type(data->irq, type);
}

+static int compat_irq_set_wake(struct irq_data *data, unsigned int on)
+{
+ return irq_data_to_desc(data)->chip->set_wake(data->irq, on);
+}
+
static void compat_bus_lock(struct irq_data *data)
{
irq_data_to_desc(data)->chip->bus_lock(data->irq);
@@ -454,6 +459,8 @@ void irq_chip_set_defaults(struct irq_ch
chip->irq_set_affinity = compat_irq_set_affinity;
if (chip->set_type)
chip->irq_set_type = compat_irq_set_type;
+ if (chip->set_wake)
+ chip->irq_set_wake = compat_irq_set_wake;
}

static inline void mask_ack_irq(struct irq_desc *desc)
Index: linux-2.6-tip/kernel/irq/manage.c
===================================================================
--- linux-2.6-tip.orig/kernel/irq/manage.c
+++ linux-2.6-tip/kernel/irq/manage.c
@@ -336,8 +336,8 @@ static int set_irq_wake_real(unsigned in
struct irq_desc *desc = irq_to_desc(irq);
int ret = -ENXIO;

- if (desc->chip->set_wake)
- ret = desc->chip->set_wake(irq, on);
+ if (desc->chip->irq_set_wake)
+ ret = desc->chip->irq_set_wake(&desc->irq_data, on);

return ret;
}



\
 
 \ /
  Last update: 2010-09-27 20:11    [W:0.120 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site