Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

intel_th: Pick up irq number from resources

Platform devices pass their IRQs around as resources, so as a convenience
for the glue layer code, allow them pass the IRQ to the core driver in
the resources array.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>

+8 -1
+8 -1
drivers/hwtracing/intel_th/core.c
··· 805 805 struct resource *devres, unsigned int ndevres, int irq) 806 806 { 807 807 struct intel_th *th; 808 - int err; 808 + int err, r; 809 + 810 + if (irq == -1) 811 + for (r = 0; r < ndevres; r++) 812 + if (devres[r].flags & IORESOURCE_IRQ) { 813 + irq = devres[r].start; 814 + break; 815 + } 809 816 810 817 th = kzalloc(sizeof(*th), GFP_KERNEL); 811 818 if (!th)