From 9c193a43b5979928bc9d04fa745916953d4fd0a9 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 25 Apr 2012 11:04:33 +1000 Subject: [PATCH] leds-heartbeat-stop-on-shutdown-checkpatch-fixes ERROR: space prohibited after that '!' (ctx:WxW) #45: FILE: drivers/leds/ledtrig-heartbeat.c:121: + if( ! rc ) ^ ERROR: space prohibited after that open parenthesis '(' #45: FILE: drivers/leds/ledtrig-heartbeat.c:121: + if( ! rc ) ERROR: space prohibited before that close parenthesis ')' #45: FILE: drivers/leds/ledtrig-heartbeat.c:121: + if( ! rc ) ERROR: space required before the open parenthesis '(' #45: FILE: drivers/leds/ledtrig-heartbeat.c:121: + if( ! rc ) total: 4 errors, 0 warnings, 36 lines checked ./patches/leds-heartbeat-stop-on-shutdown.patch has style problems, please review. If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Alexander Holler Cc: Richard Purdie Cc: Shuah Khan Signed-off-by: Andrew Morton --- drivers/leds/ledtrig-heartbeat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c index 8ec5fecf577f..233a372158a4 100644 --- a/drivers/leds/ledtrig-heartbeat.c +++ b/drivers/leds/ledtrig-heartbeat.c @@ -118,7 +118,8 @@ static struct notifier_block heartbeat_reboot_nb = { static int __init heartbeat_trig_init(void) { int rc = led_trigger_register(&heartbeat_led_trigger); - if( ! rc ) + + if (!rc) register_reboot_notifier(&heartbeat_reboot_nb); return rc; } -- 2.39.5