From patchwork Wed May 25 06:37:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 9134861 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7F985607DA for ; Wed, 25 May 2016 06:38:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EF26282BB for ; Wed, 25 May 2016 06:38:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63FA0282BF; Wed, 25 May 2016 06:38:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E2F5282BE for ; Wed, 25 May 2016 06:38:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518AbcEYGiU (ORCPT ); Wed, 25 May 2016 02:38:20 -0400 Received: from sauhun.de ([89.238.76.85]:34465 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751022AbcEYGiS (ORCPT ); Wed, 25 May 2016 02:38:18 -0400 Received: from dslb-178-008-084-178.178.008.pools.vodafone-ip.de ([178.8.84.178]:38502 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1b5SSO-0006Cb-EG; Wed, 25 May 2016 08:38:16 +0200 From: Wolfram Sang To: linux-watchdog@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang Subject: [PATCH 3/7] watchdog: softdog: consistently use softdog_ prefix Date: Wed, 25 May 2016 08:37:45 +0200 Message-Id: <1464158269-2447-4-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1464158269-2447-1-git-send-email-wsa@the-dreams.de> References: <1464158269-2447-1-git-send-email-wsa@the-dreams.de> Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang And move module_init/exit to the proper place while here. Signed-off-by: Wolfram Sang Reviewed-by: Guenter Roeck --- drivers/watchdog/softdog.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/watchdog/softdog.c b/drivers/watchdog/softdog.c index a9ad27dd46502b..0a29f5a0833787 100644 --- a/drivers/watchdog/softdog.c +++ b/drivers/watchdog/softdog.c @@ -54,12 +54,12 @@ module_param(soft_panic, int, 0); MODULE_PARM_DESC(soft_panic, "Softdog action, set to 1 to panic, 0 to reboot (default=0)"); -static void watchdog_fire(unsigned long); +static void softdog_fire(unsigned long); -static struct timer_list watchdog_ticktock = - TIMER_INITIALIZER(watchdog_fire, 0, 0); +static struct timer_list softdog_ticktock = + TIMER_INITIALIZER(softdog_fire, 0, 0); -static void watchdog_fire(unsigned long data) +static void softdog_fire(unsigned long data) { module_put(THIS_MODULE); if (soft_noboot) @@ -76,14 +76,14 @@ static void watchdog_fire(unsigned long data) static int softdog_ping(struct watchdog_device *w) { - if (!mod_timer(&watchdog_ticktock, jiffies+(w->timeout*HZ))) + if (!mod_timer(&softdog_ticktock, jiffies+(w->timeout*HZ))) __module_get(THIS_MODULE); return 0; } static int softdog_stop(struct watchdog_device *w) { - if (del_timer(&watchdog_ticktock)) + if (del_timer(&softdog_ticktock)) module_put(THIS_MODULE); return 0; @@ -115,7 +115,7 @@ static struct watchdog_device softdog_dev = { .timeout = TIMER_MARGIN, }; -static int __init watchdog_init(void) +static int __init softdog_init(void) { int ret; @@ -132,14 +132,13 @@ static int __init watchdog_init(void) return 0; } +module_init(softdog_init); -static void __exit watchdog_exit(void) +static void __exit softdog_exit(void) { watchdog_unregister_device(&softdog_dev); } - -module_init(watchdog_init); -module_exit(watchdog_exit); +module_exit(softdog_exit); MODULE_AUTHOR("Alan Cox"); MODULE_DESCRIPTION("Software Watchdog Device Driver");