diff options
author | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-05-26 15:54:22 +0000 |
---|---|---|
committer | kaloz <kaloz@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2007-05-26 15:54:22 +0000 |
commit | 16cbe040ffadb2e79c42766c59305bf9ab8629e8 (patch) | |
tree | b8b2e2dbef51fbf1bb11a07f12a249de0ea54a37 /package | |
parent | f7bbf53880298080015cc9f9b9e7a1405fe83c49 (diff) |
bcm47xx compile fix for .21, thanks to noz
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7337 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/broadcom-diag/src/diag.c | 10 | ||||
-rw-r--r-- | package/broadcom-diag/src/diag.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c index 2441ce9dd..7866b9f79 100644 --- a/package/broadcom-diag/src/diag.c +++ b/package/broadcom-diag/src/diag.c @@ -675,8 +675,14 @@ static void unregister_buttons(struct button_t *b) gpio_set_irqenable(0, button_handler); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) +static void hotplug_button(struct work_struct *work) +{ + struct event_t *event = container_of(work, struct event_t, wq); +#else static void hotplug_button(struct event_t *event) { +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) call_usermodehelper (event->argv[0], event->argv, event->envp, 1); #else @@ -724,7 +730,11 @@ static irqreturn_t button_handler(int irq, void *dev_id, struct pt_regs *regs) scratch += sprintf (scratch, "SEEN=%ld", (jiffies - b->seen)/HZ) + 1; event->envp[i] = 0; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) + INIT_WORK(&event->wq, (void *)(void *)hotplug_button); +#else INIT_WORK(&event->wq, (void *)(void *)hotplug_button, (void *)event); +#endif schedule_work(&event->wq); } diff --git a/package/broadcom-diag/src/diag.h b/package/broadcom-diag/src/diag.h index dcc122ad2..9b6dc3633 100644 --- a/package/broadcom-diag/src/diag.h +++ b/package/broadcom-diag/src/diag.h @@ -88,7 +88,11 @@ static struct platform_t platform; static void register_buttons(struct button_t *b); static void unregister_buttons(struct button_t *b); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20) +static void hotplug_button(struct work_struct *work); +#else static void hotplug_button(struct event_t *event); +#endif static irqreturn_t button_handler(int irq, void *dev_id, struct pt_regs *regs); /* leds */ |