diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2017-03-17 11:05:18 +0100 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2017-03-23 12:45:50 +0100 |
commit | f6dd8449cd50de25881b76cecf1086bebeb11fe8 (patch) | |
tree | fa757139b73dc9a8e79e46952d93db19dd5e8068 /drivers/mfd/wm831x-irq.c | |
parent | Linux 4.11-rc1 (diff) | |
download | linux-f6dd8449cd50de25881b76cecf1086bebeb11fe8.tar.xz linux-f6dd8449cd50de25881b76cecf1086bebeb11fe8.zip |
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.c | 6 |
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; |