mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
gpio-button-hotplug: cleanup, fix compiler warning
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37665
This commit is contained in:
parent
4281026dda
commit
18e37d8caf
@ -128,6 +128,7 @@ static int bh_event_add_var(struct bh_event *event, int argv,
|
|||||||
|
|
||||||
static int button_hotplug_fill_event(struct bh_event *event)
|
static int button_hotplug_fill_event(struct bh_event *event)
|
||||||
{
|
{
|
||||||
|
char *s;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = bh_event_add_var(event, 0, "HOME=%s", "/");
|
ret = bh_event_add_var(event, 0, "HOME=%s", "/");
|
||||||
@ -139,14 +140,11 @@ static int button_hotplug_fill_event(struct bh_event *event)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
char *s;
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case EV_KEY:
|
|
||||||
s = "button";
|
|
||||||
break;
|
|
||||||
case EV_SW:
|
case EV_SW:
|
||||||
s = "switch";
|
s = "switch";
|
||||||
break;
|
break;
|
||||||
|
case EV_KEY:
|
||||||
default:
|
default:
|
||||||
s = "button";
|
s = "button";
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user