From: Linus Walleij Date: Tue, 10 Jun 2014 12:31:32 +0000 (+0200) Subject: mfd: tc3589x: Translate onecell, not twocell X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=627918ed1278c7274c29340779fff958afa2c3a5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mfd: tc3589x: Translate onecell, not twocell Something changed in the OF parser in the v3.16 merge window making it be strict about passing the number of IRQ cells correctly and disturbing the irqdomain xlate function guard to crash when subdevices try to obtain IRQs like this: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at /home/linus/linux-stericsson/kernel/irq/irqdomain.c:676 irq_domain_xlate_twocell+0x40/0x48() Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.15.0-07915-gf6d059821ce9-dirty #46 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x9c/0xd4) [] (dump_stack) from [] (warn_slowpath_common+0x6c/0x88) [] (warn_slowpath_common) from [] (warn_slowpath_null+0x1c/0x24) [] (warn_slowpath_null) from [] (irq_domain_xlate_twocell+0x40/0x48) [] (irq_domain_xlate_twocell) from [] (irq_create_of_mapping+0x64/0x110) [] (irq_create_of_mapping) from [] (of_irq_get+0x38/0x48) [] (of_irq_get) from [] (tc3589x_gpio_probe+0x38/0x1e4) [] (tc3589x_gpio_probe) from [] (platform_drv_probe+0x18/0x48) [] (platform_drv_probe) from [] (driver_probe_device+0x118/0x24c) [] (driver_probe_device) from [] (bus_for_each_drv+0x58/0x8c) [] (bus_for_each_drv) from [] (device_attach+0x74/0x88) [] (device_attach) from [] (bus_probe_device+0x84/0xa8) [] (bus_probe_device) from [] (device_add+0x440/0x520) [] (device_add) from [] (platform_device_add+0xb4/0x218) [] (platform_device_add) from [] (mfd_add_device+0x220/0x31c) [] (mfd_add_device) from [] (mfd_add_devices+0xa4/0x100) [] (mfd_add_devices) from [] (tc3589x_probe+0x334/0x3c0) [] (tc3589x_probe) from [] (driver_probe_device+0x118/0x24c) The TC3589x device trees specify the MFD core device as having one interrupt cell (cannot specify flags) so the twocell translation function is clearly wrong, changing it to onecell, as it should be, fixes the regression. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones --- diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index bd83accc0f6d..0072e668c208 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -236,7 +236,7 @@ static void tc3589x_irq_unmap(struct irq_domain *d, unsigned int virq) static struct irq_domain_ops tc3589x_irq_ops = { .map = tc3589x_irq_map, .unmap = tc3589x_irq_unmap, - .xlate = irq_domain_xlate_twocell, + .xlate = irq_domain_xlate_onecell, }; static int tc3589x_irq_init(struct tc3589x *tc3589x, struct device_node *np)