diff options
author | Peter Denison <openwrt@marshadder.org> | 2008-05-20 22:33:45 +0000 |
---|---|---|
committer | Peter Denison <openwrt@marshadder.org> | 2008-05-20 22:33:45 +0000 |
commit | f027ecb2cf9b1a1c6cab6f5e4a9d99c49bced63c (patch) | |
tree | 7730f5afe931a56f2bbb8c7973521668cf78283e /package/broadcom-diag/src/gpio.h | |
parent | de5c50cfe473bb7d7a833645697a25dd2b4f4ab7 (diff) | |
download | upstream-f027ecb2cf9b1a1c6cab6f5e4a9d99c49bced63c.tar.gz upstream-f027ecb2cf9b1a1c6cab6f5e4a9d99c49bced63c.tar.bz2 upstream-f027ecb2cf9b1a1c6cab6f5e4a9d99c49bced63c.zip |
Stopgap compilation fixes for diag and switch under 2.6.25
SVN-Revision: 11231
Diffstat (limited to 'package/broadcom-diag/src/gpio.h')
-rw-r--r-- | package/broadcom-diag/src/gpio.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/package/broadcom-diag/src/gpio.h b/package/broadcom-diag/src/gpio.h index 2284e9801e..6b1b2ada4a 100644 --- a/package/broadcom-diag/src/gpio.h +++ b/package/broadcom-diag/src/gpio.h @@ -5,6 +5,10 @@ #ifndef BCMDRIVER #include <linux/ssb/ssb_embedded.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) +#include <linux/gpio.h> +#define ssb ssb_bcm47xx +#endif extern struct ssb_bus ssb; @@ -51,11 +55,16 @@ static void gpio_set_irqenable(int enabled, irqreturn_t (*handler)(int, void *)) { int irq; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) + irq = gpio_to_irq(0); + if (irq == -EINVAL) return; +#else if (ssb.chipco.dev) irq = ssb_mips_irq(ssb.chipco.dev) + 2; else if (ssb.extif.dev) irq = ssb_mips_irq(ssb.extif.dev) + 2; else return; +#endif if (enabled) { if (request_irq(irq, handler, IRQF_SHARED | IRQF_SAMPLE_RANDOM, "gpio", handler)) |