提交 b519c15d 编写于 作者: F Frans Pop 提交者: Jiri Kosina

trivial: cleanup hpfall example code (checkpatch)

This patch makes hpfall.c conform to kernel coding style.

I have not fixed the C99 // comments on two lines as they
help indicate that those are not actually comments but
incomplete code.

Before:
 total: 10 errors, 6 warnings, 101 lines checked
After:
 total: 2 errors, 0 warnings, 99 lines checked
Signed-off-by: NFrans Pop <elendil@planet.nl>
Acked-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 cf83011d
...@@ -57,10 +57,9 @@ void ignore_me(void) ...@@ -57,10 +57,9 @@ void ignore_me(void)
{ {
protect(0); protect(0);
set_led(0); set_led(0);
} }
int main(int argc, char* argv[]) int main(int argc, char *argv[])
{ {
int fd, ret; int fd, ret;
...@@ -89,12 +88,11 @@ int main(int argc, char* argv[]) ...@@ -89,12 +88,11 @@ int main(int argc, char* argv[])
protect(21); protect(21);
set_led(1); set_led(1);
if (1 || on_ac() || lid_open()) { if (1 || on_ac() || lid_open())
alarm(2); alarm(2);
} else { else
alarm(20); alarm(20);
} }
}
close(fd); close(fd);
return EXIT_SUCCESS; return EXIT_SUCCESS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册