fix a memleak in broadcom-diag (#1780)
[openwrt-10.03/.git] / package / broadcom-diag / src / diag.h
index 30791cffe3575091d1f31e07f7a5043e35a968df..9b6dc3633652323f2564478dcecf63dcd71fa7c3 100644 (file)
@@ -21,6 +21,7 @@
  * $Id:$
  */
 
+#include <linux/irq.h>
 #define MODULE_NAME "diag"
 
 #define MAX_GPIO 8
@@ -66,6 +67,7 @@ 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];
 };
@@ -86,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 */