Merge tag 'x86-asm-2024-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
[linux-2.6-block.git] / drivers / irqchip / irq-bcm6345-l1.c
index 6341c0167c4ab78b8f3fceade07c24ee852f6226..eb02d203c9634fb649a27ce03c6a9c00785b60e0 100644 (file)
@@ -60,7 +60,6 @@
 #include <linux/of.h>
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 #include <linux/smp.h>
@@ -243,7 +242,7 @@ static int __init bcm6345_l1_init_one(struct device_node *dn,
        else if (intc->n_words != n_words)
                return -EINVAL;
 
-       cpu = intc->cpus[idx] = kzalloc(sizeof(*cpu) + n_words * sizeof(u32),
+       cpu = intc->cpus[idx] = kzalloc(struct_size(cpu, enable_cache, n_words),
                                        GFP_KERNEL);
        if (!cpu)
                return -ENOMEM;