Commit 25a947f8 authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz

mfd: Convert Wolfson MFD drivers to use irq_data accessor function

Actually makes the code larger rathe rthan smaller but does provide some
isolation against core API changes.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 845aeab5
...@@ -347,14 +347,14 @@ static inline struct wm831x_irq_data *irq_to_wm831x_irq(struct wm831x *wm831x, ...@@ -347,14 +347,14 @@ static inline struct wm831x_irq_data *irq_to_wm831x_irq(struct wm831x *wm831x,
static void wm831x_irq_lock(struct irq_data *data) static void wm831x_irq_lock(struct irq_data *data)
{ {
struct wm831x *wm831x = data->chip_data; struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
mutex_lock(&wm831x->irq_lock); mutex_lock(&wm831x->irq_lock);
} }
static void wm831x_irq_sync_unlock(struct irq_data *data) static void wm831x_irq_sync_unlock(struct irq_data *data)
{ {
struct wm831x *wm831x = data->chip_data; struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
int i; int i;
for (i = 0; i < ARRAY_SIZE(wm831x->irq_masks_cur); i++) { for (i = 0; i < ARRAY_SIZE(wm831x->irq_masks_cur); i++) {
...@@ -373,7 +373,7 @@ static void wm831x_irq_sync_unlock(struct irq_data *data) ...@@ -373,7 +373,7 @@ static void wm831x_irq_sync_unlock(struct irq_data *data)
static void wm831x_irq_unmask(struct irq_data *data) static void wm831x_irq_unmask(struct irq_data *data)
{ {
struct wm831x *wm831x = data->chip_data; struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x,
data->irq); data->irq);
...@@ -382,7 +382,7 @@ static void wm831x_irq_unmask(struct irq_data *data) ...@@ -382,7 +382,7 @@ static void wm831x_irq_unmask(struct irq_data *data)
static void wm831x_irq_mask(struct irq_data *data) static void wm831x_irq_mask(struct irq_data *data)
{ {
struct wm831x *wm831x = data->chip_data; struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x,
data->irq); data->irq);
...@@ -391,7 +391,7 @@ static void wm831x_irq_mask(struct irq_data *data) ...@@ -391,7 +391,7 @@ static void wm831x_irq_mask(struct irq_data *data)
static int wm831x_irq_set_type(struct irq_data *data, unsigned int type) static int wm831x_irq_set_type(struct irq_data *data, unsigned int type)
{ {
struct wm831x *wm831x = data->chip_data; struct wm831x *wm831x = irq_data_get_irq_chip_data(data);
int val, irq; int val, irq;
irq = data->irq - wm831x->irq_base; irq = data->irq - wm831x->irq_base;
......
...@@ -419,14 +419,14 @@ static irqreturn_t wm8350_irq(int irq, void *irq_data) ...@@ -419,14 +419,14 @@ static irqreturn_t wm8350_irq(int irq, void *irq_data)
static void wm8350_irq_lock(struct irq_data *data) static void wm8350_irq_lock(struct irq_data *data)
{ {
struct wm8350 *wm8350 = data->chip_data; struct wm8350 *wm8350 = irq_data_get_irq_chip_data(data);
mutex_lock(&wm8350->irq_lock); mutex_lock(&wm8350->irq_lock);
} }
static void wm8350_irq_sync_unlock(struct irq_data *data) static void wm8350_irq_sync_unlock(struct irq_data *data)
{ {
struct wm8350 *wm8350 = data->chip_data; struct wm8350 *wm8350 = irq_data_get_irq_chip_data(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++) {
...@@ -444,7 +444,7 @@ static void wm8350_irq_sync_unlock(struct irq_data *data) ...@@ -444,7 +444,7 @@ static void wm8350_irq_sync_unlock(struct irq_data *data)
static void wm8350_irq_enable(struct irq_data *data) static void wm8350_irq_enable(struct irq_data *data)
{ {
struct wm8350 *wm8350 = data->chip_data; struct wm8350 *wm8350 = irq_data_get_irq_chip_data(data);
struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350, struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350,
data->irq); data->irq);
...@@ -453,7 +453,7 @@ static void wm8350_irq_enable(struct irq_data *data) ...@@ -453,7 +453,7 @@ static void wm8350_irq_enable(struct irq_data *data)
static void wm8350_irq_disable(struct irq_data *data) static void wm8350_irq_disable(struct irq_data *data)
{ {
struct wm8350 *wm8350 = data->chip_data; struct wm8350 *wm8350 = irq_data_get_irq_chip_data(data);
struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350, struct wm8350_irq_data *irq_data = irq_to_wm8350_irq(wm8350,
data->irq); data->irq);
......
...@@ -158,14 +158,14 @@ static inline struct wm8994_irq_data *irq_to_wm8994_irq(struct wm8994 *wm8994, ...@@ -158,14 +158,14 @@ static inline struct wm8994_irq_data *irq_to_wm8994_irq(struct wm8994 *wm8994,
static void wm8994_irq_lock(struct irq_data *data) static void wm8994_irq_lock(struct irq_data *data)
{ {
struct wm8994 *wm8994 = data->chip_data; struct wm8994 *wm8994 = irq_data_get_irq_chip_data(data);
mutex_lock(&wm8994->irq_lock); mutex_lock(&wm8994->irq_lock);
} }
static void wm8994_irq_sync_unlock(struct irq_data *data) static void wm8994_irq_sync_unlock(struct irq_data *data)
{ {
struct wm8994 *wm8994 = data->chip_data; struct wm8994 *wm8994 = irq_data_get_irq_chip_data(data);
int i; int i;
for (i = 0; i < ARRAY_SIZE(wm8994->irq_masks_cur); i++) { for (i = 0; i < ARRAY_SIZE(wm8994->irq_masks_cur); i++) {
...@@ -184,7 +184,7 @@ static void wm8994_irq_sync_unlock(struct irq_data *data) ...@@ -184,7 +184,7 @@ static void wm8994_irq_sync_unlock(struct irq_data *data)
static void wm8994_irq_unmask(struct irq_data *data) static void wm8994_irq_unmask(struct irq_data *data)
{ {
struct wm8994 *wm8994 = data->chip_data; struct wm8994 *wm8994 = irq_data_get_irq_chip_data(data);
struct wm8994_irq_data *irq_data = irq_to_wm8994_irq(wm8994, struct wm8994_irq_data *irq_data = irq_to_wm8994_irq(wm8994,
data->irq); data->irq);
...@@ -193,7 +193,7 @@ static void wm8994_irq_unmask(struct irq_data *data) ...@@ -193,7 +193,7 @@ static void wm8994_irq_unmask(struct irq_data *data)
static void wm8994_irq_mask(struct irq_data *data) static void wm8994_irq_mask(struct irq_data *data)
{ {
struct wm8994 *wm8994 = data->chip_data; struct wm8994 *wm8994 = irq_data_get_irq_chip_data(data);
struct wm8994_irq_data *irq_data = irq_to_wm8994_irq(wm8994, struct wm8994_irq_data *irq_data = irq_to_wm8994_irq(wm8994,
data->irq); data->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