From: Hauke Mehrtens Date: Tue, 26 Apr 2011 21:49:44 +0000 (+0200) Subject: compat-wireless: fix compile problem with IRQF_ONESHOT X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d9c3856390761f75e6820acd212535879faadeac;p=openwrt%2Fstaging%2Fblogic.git compat-wireless: fix compile problem with IRQF_ONESHOT IRQF_ONESHOT was introduced in kernel 2.6.32 and wl12xx uses it. This patch reverts back to the old behavior when older kernels are used. Signed-off-by: Hauke Mehrtens --- diff --git a/patches/09-threaded-irq.patch b/patches/09-threaded-irq.patch index 82c817f8436e..0e25e21c9259 100644 --- a/patches/09-threaded-irq.patch +++ b/patches/09-threaded-irq.patch @@ -63,22 +63,33 @@ thread in process context as well. /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */ --- a/drivers/net/wireless/wl12xx/spi.c +++ b/drivers/net/wireless/wl12xx/spi.c -@@ -417,9 +417,20 @@ static int __devinit wl1271_probe(struct +@@ -405,10 +405,14 @@ static int __devinit wl1271_probe(struct + wl->tcxo_clock = pdata->board_tcxo_clock; + wl->platform_quirks = pdata->platform_quirks; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) ++ irqflags = IRQF_TRIGGER_RISING; ++#else + if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) + irqflags = IRQF_TRIGGER_RISING; + else + irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; ++#endif + + wl->irq = spi->irq; + if (wl->irq < 0) { +@@ -417,9 +421,16 @@ static int __devinit wl1271_probe(struct goto out_free; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31) + ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq, + wl1271_hardirq, wl1271_irq, -+ IRQF_TRIGGER_RISING, ++ irqflags, + DRIVER_NAME, wl); +#else ret = request_threaded_irq(wl->irq, wl1271_hardirq, wl1271_irq, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32) -+ IRQF_TRIGGER_RISING, -+#else irqflags, -+#endif DRIVER_NAME, wl); +#endif if (ret < 0) {