Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261862
b: refs/heads/master
c: d1738ae
h: refs/heads/master
v: v3
  • Loading branch information
Sascha Hauer authored and Samuel Ortiz committed Jul 31, 2011
1 parent d4b4545 commit 8d13a8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e69b6de181167a132eee7c38c7e4b47dea3d8e49
refs/heads/master: d1738aef387ab9591a6d13b00945e248b942c53f
18 changes: 12 additions & 6 deletions trunk/drivers/mfd/wm8350-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,17 +473,13 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
{
int ret, cur_irq, i;
int flags = IRQF_ONESHOT;
int irq_base = -1;

if (!irq) {
dev_warn(wm8350->dev, "No interrupt support, no core IRQ\n");
return 0;
}

if (!pdata || !pdata->irq_base) {
dev_warn(wm8350->dev, "No interrupt support, no IRQ base\n");
return 0;
}

/* Mask top level interrupts */
wm8350_reg_write(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK, 0xFFFF);

Expand All @@ -502,7 +498,17 @@ int wm8350_irq_init(struct wm8350 *wm8350, int irq,
wm8350->chip_irq = irq;
wm8350->irq_base = pdata->irq_base;

if (pdata->irq_high) {
if (pdata && pdata->irq_base > 0)
irq_base = pdata->irq_base;

wm8350->irq_base = irq_alloc_descs(irq_base, 0, ARRAY_SIZE(wm8350_irqs), 0);
if (wm8350->irq_base < 0) {
dev_warn(wm8350->dev, "Allocating irqs failed with %d\n",
wm8350->irq_base);
return 0;
}

if (pdata && pdata->irq_high) {
flags |= IRQF_TRIGGER_HIGH;

wm8350_set_bits(wm8350, WM8350_SYSTEM_CONTROL_1,
Expand Down

0 comments on commit 8d13a8b

Please sign in to comment.