From patchwork Tue Apr 23 15:48:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 10913269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D942161F for ; Tue, 23 Apr 2019 15:50:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DC4328756 for ; Tue, 23 Apr 2019 15:50:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71EA1288D2; Tue, 23 Apr 2019 15:50:47 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 169FA28754 for ; Tue, 23 Apr 2019 15:50:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728409AbfDWPuq (ORCPT ); Tue, 23 Apr 2019 11:50:46 -0400 Received: from mail5.windriver.com ([192.103.53.11]:40428 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfDWPuq (ORCPT ); Tue, 23 Apr 2019 11:50:46 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id x3NFmwNS005137 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 23 Apr 2019 08:49:55 -0700 Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 08:49:19 -0700 From: Paul Gortmaker To: Wim Van Sebroeck , Guenter Roeck CC: , Paul Gortmaker Subject: [PATCH 1/5] watchdog: rtd119x: drop unused module.h include Date: Tue, 23 Apr 2019 11:48:31 -0400 Message-ID: <1556034515-28792-2-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> References: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig for this driver is: config RTD119X_WATCHDOG bool "Realtek RTD118x/RTD129x watchdog support" ...and hence it doesn't need to include module.h for anything. There are no other signs of unused modular infrastructure. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Paul Gortmaker Reviewed-by: Guenter Roeck --- drivers/watchdog/rtd119x_wdt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/watchdog/rtd119x_wdt.c b/drivers/watchdog/rtd119x_wdt.c index d001c17ddfde..a0787a50ac6d 100644 --- a/drivers/watchdog/rtd119x_wdt.c +++ b/drivers/watchdog/rtd119x_wdt.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include From patchwork Tue Apr 23 15:48:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 10913273 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7C20161F for ; Tue, 23 Apr 2019 15:51:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C91B0288EE for ; Tue, 23 Apr 2019 15:51:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB4572894B; Tue, 23 Apr 2019 15:51:27 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 36C3F288B3 for ; Tue, 23 Apr 2019 15:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727745AbfDWPv0 (ORCPT ); Tue, 23 Apr 2019 11:51:26 -0400 Received: from mail5.windriver.com ([192.103.53.11]:40460 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfDWPv0 (ORCPT ); Tue, 23 Apr 2019 11:51:26 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id x3NFmwNU005137 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 23 Apr 2019 08:50:06 -0700 Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 08:49:49 -0700 From: Paul Gortmaker To: Wim Van Sebroeck , Guenter Roeck CC: , Paul Gortmaker , Wim Van Sebroeck , Alan Cox Subject: [PATCH 2/5] watchdog: watchdog_core: make it explicitly non-modular Date: Tue, 23 Apr 2019 11:48:32 -0400 Message-ID: <1556034515-28792-3-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> References: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: config WATCHDOG_CORE bool "WatchDog Timer Driver Core" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We replace module.h with export.h since the file does export some symbols. We don't add init.h since the file already has that. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Alan Cox Cc: linux-watchdog@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/watchdog/watchdog_core.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c index eb8fa25f8eb2..f9f88f59d181 100644 --- a/drivers/watchdog/watchdog_core.c +++ b/drivers/watchdog/watchdog_core.c @@ -28,7 +28,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#include /* For EXPORT_SYMBOL/module stuff/... */ +#include /* For EXPORT_SYMBOL stuff */ #include /* For standard types */ #include /* For the -ENODEV/... values */ #include /* For printk/panic/... */ @@ -359,17 +359,4 @@ static int __init watchdog_init(void) watchdog_deferred_registration(); return 0; } - -static void __exit watchdog_exit(void) -{ - watchdog_dev_exit(); - ida_destroy(&watchdog_ida); -} - subsys_initcall_sync(watchdog_init); -module_exit(watchdog_exit); - -MODULE_AUTHOR("Alan Cox "); -MODULE_AUTHOR("Wim Van Sebroeck "); -MODULE_DESCRIPTION("WatchDog Timer Driver Core"); -MODULE_LICENSE("GPL"); From patchwork Tue Apr 23 15:48:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 10913275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E5B8161F for ; Tue, 23 Apr 2019 15:51:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3CDD28968 for ; Tue, 23 Apr 2019 15:51:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E78D228972; Tue, 23 Apr 2019 15:51:57 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 82F1F28969 for ; Tue, 23 Apr 2019 15:51:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728005AbfDWPv5 (ORCPT ); Tue, 23 Apr 2019 11:51:57 -0400 Received: from mail5.windriver.com ([192.103.53.11]:40468 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfDWPv4 (ORCPT ); Tue, 23 Apr 2019 11:51:56 -0400 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id x3NFmwNX005137 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 23 Apr 2019 08:50:17 -0700 Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 08:50:13 -0700 From: Paul Gortmaker To: Wim Van Sebroeck , Guenter Roeck CC: , Paul Gortmaker , Avi Fishman , "Tomer Maimon" , Tali Perry , "Patrick Venture" , Nancy Yuen , Benjamin Fair , Subject: [PATCH 3/5] watchdog: npcm: make it explicitly non-modular Date: Tue, 23 Apr 2019 11:48:33 -0400 Message-ID: <1556034515-28792-4-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> References: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: config NPCM7XX_WATCHDOG bool "Nuvoton NPCM750 watchdog" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Avi Fishman Cc: Tomer Maimon Cc: Tali Perry Cc: Patrick Venture Cc: Nancy Yuen Cc: Benjamin Fair Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: openbmc@lists.ozlabs.org Cc: linux-watchdog@vger.kernel.org Signed-off-by: Paul Gortmaker --- drivers/watchdog/npcm_wdt.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/watchdog/npcm_wdt.c b/drivers/watchdog/npcm_wdt.c index 0d4213652ecc..44d305683ab6 100644 --- a/drivers/watchdog/npcm_wdt.c +++ b/drivers/watchdog/npcm_wdt.c @@ -2,11 +2,15 @@ // Copyright (c) 2018 Nuvoton Technology corporation. // Copyright (c) 2018 IBM Corp. +/* + * Watchdog driver for NPCM + * Author: Joel Stanley + */ + #include #include #include #include -#include #include #include #include @@ -237,7 +241,6 @@ static const struct of_device_id npcm_wdt_match[] = { {.compatible = "nuvoton,npcm750-wdt"}, {}, }; -MODULE_DEVICE_TABLE(of, npcm_wdt_match); #endif static struct platform_driver npcm_wdt_driver = { @@ -247,8 +250,4 @@ static struct platform_driver npcm_wdt_driver = { .of_match_table = of_match_ptr(npcm_wdt_match), }, }; -module_platform_driver(npcm_wdt_driver); - -MODULE_AUTHOR("Joel Stanley"); -MODULE_DESCRIPTION("Watchdog driver for NPCM"); -MODULE_LICENSE("GPL v2"); +builtin_platform_driver(npcm_wdt_driver); From patchwork Tue Apr 23 15:48:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 10913267 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8E132161F for ; Tue, 23 Apr 2019 15:50:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E6CA287F2 for ; Tue, 23 Apr 2019 15:50:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7253C288C6; Tue, 23 Apr 2019 15:50:44 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 B405C287F2 for ; Tue, 23 Apr 2019 15:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727666AbfDWPun (ORCPT ); Tue, 23 Apr 2019 11:50:43 -0400 Received: from mail.windriver.com ([147.11.1.11]:55923 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfDWPun (ORCPT ); Tue, 23 Apr 2019 11:50:43 -0400 Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail.windriver.com (8.15.2/8.15.1) with ESMTPS id x3NFoIV3029014 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 23 Apr 2019 08:50:18 -0700 (PDT) Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 08:50:17 -0700 From: Paul Gortmaker To: Wim Van Sebroeck , Guenter Roeck CC: , Paul Gortmaker , Wim Van Sebroeck Subject: [PATCH 4/5] watchdog: intel_scu: make it explicitly non-modular Date: Tue, 23 Apr 2019 11:48:34 -0400 Message-ID: <1556034515-28792-5-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> References: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: config INTEL_SCU_WATCHDOG bool "Intel SCU Watchdog for Mobile Platforms" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We leave the moduleparam.h include since the file does declare some module parameters, and leaving them as such is currently the easiest way to remain compatible with existing boot arg use cases. Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Paul Gortmaker Reviewed-by: Guenter Roeck --- drivers/watchdog/intel_scu_watchdog.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c index 0caab6241eb7..32bc5611f0cc 100644 --- a/drivers/watchdog/intel_scu_watchdog.c +++ b/drivers/watchdog/intel_scu_watchdog.c @@ -25,7 +25,6 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include -#include #include #include #include @@ -545,21 +544,4 @@ static int __init intel_scu_watchdog_init(void) iounmap(watchdog_device.timer_load_count_addr); return ret; } - -static void __exit intel_scu_watchdog_exit(void) -{ - - misc_deregister(&watchdog_device.miscdev); - unregister_reboot_notifier(&watchdog_device.intel_scu_notifier); - /* disable the timer */ - iowrite32(0x00000002, watchdog_device.timer_control_addr); - iounmap(watchdog_device.timer_load_count_addr); -} - late_initcall(intel_scu_watchdog_init); -module_exit(intel_scu_watchdog_exit); - -MODULE_AUTHOR("Intel Corporation"); -MODULE_DESCRIPTION("Intel SCU Watchdog Device Driver"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(WDT_VER); From patchwork Tue Apr 23 15:48:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Gortmaker X-Patchwork-Id: 10913271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 14D7C1390 for ; Tue, 23 Apr 2019 15:50:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 068DE2894B for ; Tue, 23 Apr 2019 15:50:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EEE0628918; Tue, 23 Apr 2019 15:50:54 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 6B6E32892D for ; Tue, 23 Apr 2019 15:50:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727829AbfDWPuy (ORCPT ); Tue, 23 Apr 2019 11:50:54 -0400 Received: from mail1.windriver.com ([147.11.146.13]:37683 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727467AbfDWPux (ORCPT ); Tue, 23 Apr 2019 11:50:53 -0400 Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id x3NFoLe3017793 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 23 Apr 2019 08:50:21 -0700 (PDT) Received: from yow-cube1.wrs.com (128.224.56.98) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 08:50:20 -0700 From: Paul Gortmaker To: Wim Van Sebroeck , Guenter Roeck CC: , Paul Gortmaker , Linus Walleij , Wim Van Sebroeck Subject: [PATCH 5/5] watchdog: coh901327: make it explicitly non-modular Date: Tue, 23 Apr 2019 11:48:35 -0400 Message-ID: <1556034515-28792-6-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> References: <1556034515-28792-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Kconfig currently controlling compilation of this code is: config COH901327_WATCHDOG bool "ST-Ericsson COH 901 327 watchdog" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_ALIAS is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. We replace module.h with moduleparam.h since the file does actually declare some module parameters (i.e. boot args for non-modules). Cc: Linus Walleij Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Signed-off-by: Paul Gortmaker Reviewed-by: Linus Walleij Reviewed-by: Guenter Roeck --- drivers/watchdog/coh901327_wdt.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/watchdog/coh901327_wdt.c b/drivers/watchdog/coh901327_wdt.c index f29d1edc5bad..5914cc767c87 100644 --- a/drivers/watchdog/coh901327_wdt.c +++ b/drivers/watchdog/coh901327_wdt.c @@ -6,7 +6,7 @@ * Watchdog driver for the ST-Ericsson AB COH 901 327 IP core * Author: Linus Walleij */ -#include +#include #include #include #include @@ -243,16 +243,6 @@ static struct watchdog_device coh901327_wdt = { .timeout = U300_WDOG_DEFAULT_TIMEOUT, }; -static int __exit coh901327_remove(struct platform_device *pdev) -{ - watchdog_unregister_device(&coh901327_wdt); - coh901327_disable(); - free_irq(irq, pdev); - clk_disable_unprepare(clk); - clk_put(clk); - return 0; -} - static int __init coh901327_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -408,19 +398,13 @@ static struct platform_driver coh901327_driver = { .driver = { .name = "coh901327_wdog", .of_match_table = coh901327_dt_match, + .suppress_bind_attrs = true, }, - .remove = __exit_p(coh901327_remove), .suspend = coh901327_suspend, .resume = coh901327_resume, }; +builtin_platform_driver_probe(coh901327_driver, coh901327_probe); -module_platform_driver_probe(coh901327_driver, coh901327_probe); - -MODULE_AUTHOR("Linus Walleij "); -MODULE_DESCRIPTION("COH 901 327 Watchdog"); - +/* not really modular, but ... */ module_param(margin, uint, 0); MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)"); - -MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:coh901327-watchdog");