Commit fdcc475b authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Convert WM835x to new irq_ interrupt methods

Kernel 2.6.37 adds new interrupt methods which take a struct irq_data
rather than an irq number. Convert over to these as they will become
mandatory in future.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ba81cd39
...@@ -417,16 +417,16 @@ static irqreturn_t wm8350_irq(int irq, void *irq_data) ...@@ -417,16 +417,16 @@ static irqreturn_t wm8350_irq(int irq, void *irq_data)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void wm8350_irq_lock(unsigned int irq) static void wm8350_irq_lock(struct irq_data *data)
{ {
struct wm8350 *wm8350 = get_irq_chip_data(irq); struct wm8350 *wm8350 = data->chip_data;
mutex_lock(&wm8350->irq_lock); mutex_lock(&wm8350->irq_lock);
} }
static void wm8350_irq_sync_unlock(unsigned int irq) static void wm8350_irq_sync_unlock(struct irq_data *data)
{ {
struct wm8350 *wm8350 = get_irq_chip_data(irq); struct wm8350 *wm8350 = data->chip_data;
int i; int i;
for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) { for (i = 0; i < ARRAY_SIZE(wm8350->irq_masks); i++) {
...@@ -442,28 +442,30 @@ static void wm8350_irq_sync_unlock(unsigned int irq) ...@@ -442,28 +442,30 @@ static void wm8350_irq_sync_unlock(unsigned int irq)
mutex_unlock(&wm8350->irq_lock); mutex_unlock(&wm8350->irq_lock);
} }
static void wm8350_irq_enable(unsigned int irq) static void wm8350_irq_enable(struct irq_data *data)
{ {
struct wm8350 *wm8350 = get_irq_chip_data(irq); struct wm8350 *wm8350 = data->chip_data;
struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350, irq); struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350,
data->irq);
wm8350->irq_masks[irq_data->reg] &= ~irq_data->mask; wm8350->irq_masks[irq_data->reg] &= ~irq_data->mask;
} }
static void wm8350_irq_disable(unsigned int irq) static void wm8350_irq_disable(struct irq_data *data)
{ {
struct wm8350 *wm8350 = get_irq_chip_data(irq); struct wm8350 *wm8350 = data->chip_data;
struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350, irq); struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350,
data->irq);
wm8350->irq_masks[irq_data->reg] |= irq_data->mask; wm8350->irq_masks[irq_data->reg] |= irq_data->mask;
} }
static struct irq_chip wm8350_irq_chip = { static struct irq_chip wm8350_irq_chip = {
.name = "wm8350", .name = "wm8350",
.bus_lock = wm8350_irq_lock, .irq_bus_lock = wm8350_irq_lock,
.bus_sync_unlock = wm8350_irq_sync_unlock, .irq_bus_sync_unlock = wm8350_irq_sync_unlock,
.disable = wm8350_irq_disable, .irq_disable = wm8350_irq_disable,
.enable = wm8350_irq_enable, .irq_enable = wm8350_irq_enable,
}; };
int wm8350_irq_init(struct wm8350 *wm8350, int irq, int wm8350_irq_init(struct wm8350 *wm8350, int irq,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment