aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel')
-rw-r--r--package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index d81898f932..f429f8c027 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -253,6 +253,9 @@ static void button_hotplug_event(struct gpio_keys_button_data *data,
if (btn < 0)
return;
+ if (priv->seen == 0)
+ priv->seen = seen;
+
button_hotplug_create_event(button_map[btn].name, type,
(seen - priv->seen) / HZ, value);
priv->seen = seen;