X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/2c4d27ff3bf2665454a8c742922ead6a3b7645d2..e326121c9610baedc4634b8a3dc2664c4d5b449b:/package/broadcom-diag/src/diag.h diff --git a/package/broadcom-diag/src/diag.h b/package/broadcom-diag/src/diag.h index 30791cffe..5f46d9dd8 100644 --- a/package/broadcom-diag/src/diag.h +++ b/package/broadcom-diag/src/diag.h @@ -21,6 +21,7 @@ * $Id:$ */ +#include #define MODULE_NAME "diag" #define MAX_GPIO 8 @@ -29,6 +30,7 @@ enum polarity_t { REVERSE = 0, NORMAL = 1, + INPUT = 2, }; enum { @@ -66,15 +68,23 @@ struct platform_t { struct button_t buttons[MAX_GPIO]; u32 button_mask; u32 button_polarity; + void (*platform_init)(void); struct led_t leds[MAX_GPIO]; }; struct event_t { struct work_struct wq; - char buf[256]; - char *argv[3]; - char *envp[6]; + unsigned long seen; + char *name, *action; +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) + struct sk_buff *skb; +#else + char *scratch; + char *argv[4]; + char *envp[7]; + u8 enr, anr; +#endif }; extern char *nvram_get(char *str); @@ -86,8 +96,13 @@ static struct platform_t platform; static void register_buttons(struct button_t *b); static void unregister_buttons(struct button_t *b); +#ifndef LINUX_2_4 +static void hotplug_button(struct work_struct *work); +static irqreturn_t button_handler(int irq, void *dev_id); +#else static void hotplug_button(struct event_t *event); static irqreturn_t button_handler(int irq, void *dev_id, struct pt_regs *regs); +#endif /* leds */