X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=drivers%2Fchar%2Fnwbutton.c;h=0e184426db98ed956c9d25bfb9566f608711980d;hb=fffad3e1b34aaced7724ef513dff0d8232ad8d80;hp=76c490fa051103b99ba6b1006f7b8c2ed2a575a2;hpb=915ac4e26ef9c39a0f831e935509243732abedc0;p=deliverable%2Flinux.git diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c index 76c490fa0511..0e184426db98 100644 --- a/drivers/char/nwbutton.c +++ b/drivers/char/nwbutton.c @@ -129,10 +129,9 @@ static void button_consume_callbacks (int bpcount) static void button_sequence_finished (unsigned long parameters) { -#ifdef CONFIG_NWBUTTON_REBOOT /* Reboot using button is enabled */ - if (button_press_count == reboot_count) + if (IS_ENABLED(CONFIG_NWBUTTON_REBOOT) && + button_press_count == reboot_count) kill_cad_pid(SIGINT, 1); /* Ask init to reboot us */ -#endif /* CONFIG_NWBUTTON_REBOOT */ button_consume_callbacks (button_press_count); bcount = sprintf (button_output_buffer, "%d\n", button_press_count); button_press_count = 0; /* Reset the button press counter */