Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3199438imu; Mon, 17 Dec 2018 15:20:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/Weih2Nuj+s63+QrXngu1fUihBjz/rPQQ8q2/nkvF7h05NwDQJjAIbdHQtyHxeyuehvBtOE X-Received: by 2002:a62:7a8b:: with SMTP id v133mr14903056pfc.159.1545088836755; Mon, 17 Dec 2018 15:20:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545088836; cv=none; d=google.com; s=arc-20160816; b=DcpcXoAM3jcSsYQI7bH2W0nSMrC9s3nm9geonxIrDjApoKzmWL8B/i4EkJaz4iKYKG 3uPYEOhKdRbjxN+/W6J33abC/+7OJKUvt+vxJsAy3p3LA1W+jp5+QmByYbuvD5YGhXkY o/QgNVNTsXyK6/kq2qZvbNdxo7nDRBhV+w8nCLF55xlGlSxZbu21032W+iUTDMtuUnm+ Y8CGK03XLonX7/w8AdIA1ZCt8J0I/8+ylAzsQxPfqhUuxnb7PWJZfXnZbl7mn7ChzGOc J5T4mOhcnijkzkCVp1jLnt9HEYhP6har/mM7NXg1pDd1BO10x+HKkuxVD/kILpTYbZMp 4T9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=BYZ6hh0R5KfvS/n4s3tWFNi9AXABkbDoB3v/ZsoNpX8=; b=idopI52RufBjOedFWTfkNywa0tpAeCNW0QgZjm6ev3nu2tKTP24Vi/B1/CxHiYanK/ cT24X303Sw9ZVJ/n6ejVsVYRPUx8cDpoWJIhXtc4lIAHx61+7sbIl3aqSF7FrvNu4kP7 Axv+Mnj4QkD3FdMpES4jea7Bkj7Mdeje56lvjrK/bVo6yDPxOTrRx8ZuqFhnUCnObeUK Wev8DXe+eaOezKGEbXZJ9zNHJ5AcGLppN0tiWkMllCP/Yg66fyQavYqJW8pyuLOgzqJX 2YmqyQ4tRfc9Uv26umiDOYAqJLHZVr1FEUcCsmVcBZFBhi5NEtHthvluPUI8mIRSqHhg aU8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10si7786732pgt.155.2018.12.17.15.20.21; Mon, 17 Dec 2018 15:20:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387720AbeLQUiR (ORCPT + 99 others); Mon, 17 Dec 2018 15:38:17 -0500 Received: from mail5.windriver.com ([192.103.53.11]:42874 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbeLQUiR (ORCPT ); Mon, 17 Dec 2018 15:38:17 -0500 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 wBHKaDBj030388 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 17 Dec 2018 12:37:29 -0800 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.408.0; Mon, 17 Dec 2018 12:37:20 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Mark Brown , Subject: [PATCH 18/18] mfd: wm8400-core: Make it explicitly non-modular Date: Mon, 17 Dec 2018 15:31:28 -0500 Message-ID: <1545078688-21217-19-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545078688-21217-1-git-send-email-paul.gortmaker@windriver.com> References: <1545078688-21217-1-git-send-email-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_WM8400 drivers/mfd/Kconfig: bool "Wolfson Microelectronics WM8400" ...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_init was not in use by this code, the init ordering remains unchanged with this commit. A trivial function rename from wm8400_module_init to the name wm8400_driver_init is also done to reduce possible confusion. 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 is already contained at the top of the file in the comments. Cc: Lee Jones Cc: Mark Brown Cc: patches@opensource.cirrus.com Signed-off-by: Paul Gortmaker Acked-by: Linus Walleij --- drivers/mfd/wm8400-core.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c index 8a98a2fc74e1..79756c83f5f0 100644 --- a/drivers/mfd/wm8400-core.c +++ b/drivers/mfd/wm8400-core.c @@ -12,7 +12,7 @@ * */ -#include +#include #include #include #include @@ -150,7 +150,6 @@ static const struct i2c_device_id wm8400_i2c_id[] = { { "wm8400", 0 }, { } }; -MODULE_DEVICE_TABLE(i2c, wm8400_i2c_id); static struct i2c_driver wm8400_i2c_driver = { .driver = { @@ -161,7 +160,7 @@ static struct i2c_driver wm8400_i2c_driver = { }; #endif -static int __init wm8400_module_init(void) +static int __init wm8400_driver_init(void) { int ret = -ENODEV; @@ -173,15 +172,4 @@ static int __init wm8400_module_init(void) return ret; } -subsys_initcall(wm8400_module_init); - -static void __exit wm8400_module_exit(void) -{ -#if IS_ENABLED(CONFIG_I2C) - i2c_del_driver(&wm8400_i2c_driver); -#endif -} -module_exit(wm8400_module_exit); - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Mark Brown "); +subsys_initcall(wm8400_driver_init); -- 2.7.4