You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
mfd: ab8500: Pass AB8500 IRQ to debugfs code by resource
The AB8500 debug code which was merged in parallell with the multiplatform work incidentally introduced a new instance using the <mach/irqs.h> header which is now deleted, causing this build regression: drivers/mfd/ab8500-debugfs.c:95:23: fatal error: mach/irqs.h: No such file or directory compilation terminated. make[4]: *** [drivers/mfd/ab8500-debugfs.o] Error 1 The code most certainly never worked with device tree either since that does not rely on this kind of hard-coded interrupt numbers. Fix the problem at the root by passing it as a named resource from the ab8500-core driver. Use an untyped resource to stop the MFD core from remapping this IRQ relative to the AB8500 irqdomain. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
33a0d1907f
commit
6999181eec
@@ -91,12 +91,10 @@
|
||||
#include <linux/ctype.h>
|
||||
#endif
|
||||
|
||||
/* TODO: this file should not reference IRQ_DB8500_AB8500! */
|
||||
#include <mach/irqs.h>
|
||||
|
||||
static u32 debug_bank;
|
||||
static u32 debug_address;
|
||||
|
||||
static int irq_ab8500;
|
||||
static int irq_first;
|
||||
static int irq_last;
|
||||
static u32 *irq_count;
|
||||
@@ -1589,7 +1587,7 @@ void ab8500_debug_register_interrupt(int line)
|
||||
{
|
||||
if (line < num_interrupt_lines) {
|
||||
num_interrupts[line]++;
|
||||
if (suspend_test_wake_cause_interrupt_is_mine(IRQ_DB8500_AB8500))
|
||||
if (suspend_test_wake_cause_interrupt_is_mine(irq_ab8500))
|
||||
num_wake_interrupts[line]++;
|
||||
}
|
||||
}
|
||||
@@ -2941,6 +2939,7 @@ static int ab8500_debug_probe(struct platform_device *plf)
|
||||
struct dentry *file;
|
||||
int ret = -ENOMEM;
|
||||
struct ab8500 *ab8500;
|
||||
struct resource *res;
|
||||
debug_bank = AB8500_MISC;
|
||||
debug_address = AB8500_REV_REG & 0x00FF;
|
||||
|
||||
@@ -2959,6 +2958,15 @@ static int ab8500_debug_probe(struct platform_device *plf)
|
||||
if (!event_name)
|
||||
goto out_freedev_attr;
|
||||
|
||||
res = platform_get_resource_byname(plf, 0, "IRQ_AB8500");
|
||||
if (!res) {
|
||||
dev_err(&plf->dev, "AB8500 irq not found, err %d\n",
|
||||
irq_first);
|
||||
ret = -ENXIO;
|
||||
goto out_freeevent_name;
|
||||
}
|
||||
irq_ab8500 = res->start;
|
||||
|
||||
irq_first = platform_get_irq_byname(plf, "IRQ_FIRST");
|
||||
if (irq_first < 0) {
|
||||
dev_err(&plf->dev, "First irq not found, err %d\n",
|
||||
|
||||
Reference in New Issue
Block a user