aboutsummaryrefslogtreecommitdiffstats
path: root/package/broadcom-diag/src/diag.c
diff options
context:
space:
mode:
authorImre Kaloz <kaloz@openwrt.org>2007-05-26 15:54:22 +0000
committerImre Kaloz <kaloz@openwrt.org>2007-05-26 15:54:22 +0000
commit3237230249938eff87bc40954b754c89af0f0a3e (patch)
treeb68fa8ddb7a992704072c3112637c5cce0d4f58a /package/broadcom-diag/src/diag.c
parent8f83153369a227fe0531a8cbcdb53d76fba45756 (diff)
downloadupstream-3237230249938eff87bc40954b754c89af0f0a3e.tar.gz
upstream-3237230249938eff87bc40954b754c89af0f0a3e.tar.bz2
upstream-3237230249938eff87bc40954b754c89af0f0a3e.zip
bcm47xx compile fix for .21, thanks to noz
SVN-Revision: 7337
Diffstat (limited to 'package/broadcom-diag/src/diag.c')
-rw-r--r--package/broadcom-diag/src/diag.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/broadcom-diag/src/diag.c b/package/broadcom-diag/src/diag.c
index 2441ce9dda..7866b9f798 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);
}