summaryrefslogtreecommitdiff
path: root/drivers/mfd/wm831x-irq.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2017-03-17 10:05:18 +0000
committerLee Jones <lee.jones@linaro.org>2017-03-23 11:45:50 +0000
commitf6dd8449cd50de25881b76cecf1086bebeb11fe8 (patch)
treefa757139b73dc9a8e79e46952d93db19dd5e8068 /drivers/mfd/wm831x-irq.c
parentc1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201 (diff)
mfd: wm831x: Add basic device tree binding
Add the basic ability to register the device through device tree, more work is needed to get each individual sub-driver functioning correctly but this is enough to get the device to probe from device tree. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/wm831x-irq.c')
-rw-r--r--drivers/mfd/wm831x-irq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c
index dfea8b9c2fe6..c01239a600db 100644
--- a/drivers/mfd/wm831x-irq.c
+++ b/drivers/mfd/wm831x-irq.c
@@ -564,7 +564,7 @@ static const struct irq_domain_ops wm831x_irq_domain_ops = {
int wm831x_irq_init(struct wm831x *wm831x, int irq)
{
- struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
+ struct wm831x_pdata *pdata = &wm831x->pdata;
struct irq_domain *domain;
int i, ret, irq_base;
@@ -579,7 +579,7 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
}
/* Try to dynamically allocate IRQs if no base is specified */
- if (pdata && pdata->irq_base) {
+ if (pdata->irq_base) {
irq_base = irq_alloc_descs(pdata->irq_base, 0,
WM831X_NUM_IRQS, 0);
if (irq_base < 0) {
@@ -608,7 +608,7 @@ int wm831x_irq_init(struct wm831x *wm831x, int irq)
return -EINVAL;
}
- if (pdata && pdata->irq_cmos)
+ if (pdata->irq_cmos)
i = 0;
else
i = WM831X_IRQ_OD;