Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6515244imu; Sun, 2 Dec 2018 20:30:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/WTjDYLCN7X0kKXboZhRdX0npehvlQT5KesHR2/zDWjqHk2P7GjqEWQfH1u8zT88Jup+jUR X-Received: by 2002:a62:34c6:: with SMTP id b189mr14860734pfa.229.1543811410297; Sun, 02 Dec 2018 20:30:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543811410; cv=none; d=google.com; s=arc-20160816; b=EjDjjv6vbtMZCi7fefSNJoR8EmdssvQ9FWWpAR3HHhODjCFpjtrm6R6p3+RETTfdrp wuAphNsSdNSNeThPOYcDNigIC5UN+KPJGI+7OZxWzgmg2L9cCzfeHNaUGCQ8lgpTypuF hfUz3GzrJo/HIk5hbD8Y0s0g1hr1vAktPgCYRsGVGMwMK+B88jtjhvyabjMLo8RKisIY keVvgKp5ID35htrxpYqdk0odzD5RiQEaqPZFIaH1OkTor0PUeJST+StiMaHfW6zO9rgS aduqadhNqpmVsC1SeSDz2FfTmXdJ+23WbLfO4dSH20ghfLm8uHHnEaM0ALrkw9F5prkf tPtg== 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=59qV6RSoPZ28RzDh6U6DuHT9hxHDmD173JznR+KYK6o=; b=S4EwQj4NBDUfF8Y4X3egOm5YD++X+mN1LXVfv0eqp6jFg9uUy4XK6qHb9AKq1i1lQ+ Aq8rP3gmZPdLMdzgFIuIRbsZfhti9A1YZhqyO9jfCluY+rOz4a82QRtffOEUi0y8Ldkr Z3cBiotwV/J3MPcpnTDlbdFHl2l4NFN3ZJn/wgIYUZ7dd4ZL61KbELkm51II+sgT7WeB E1Z/2kGVYB4TCjwZvNUSVCCjf87LxJ9EZQasvGlCnyhT1qyXpfE5YDca/hLOuZXD5pf3 dzqahRhNu9BN3ZUxuyaGQQrpOS5osiNrDf1lTmYsc+emaW73KPeOHWXcpbFWdCk7l/xG T+vQ== 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 4si13238828pff.161.2018.12.02.20.29.55; Sun, 02 Dec 2018 20:30:10 -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 S1726089AbeLCE3T (ORCPT + 99 others); Sun, 2 Dec 2018 23:29:19 -0500 Received: from mail5.windriver.com ([192.103.53.11]:55272 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbeLCE3T (ORCPT ); Sun, 2 Dec 2018 23:29:19 -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 wB34R7Qp018287 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 2 Dec 2018 20:28:46 -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; Sun, 2 Dec 2018 20:28:41 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Subject: [PATCH 20/22] mfd: wm8350-i2c: Make it explicitly non-modular Date: Sun, 2 Dec 2018 23:23:27 -0500 Message-ID: <1543811009-15112-21-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543811009-15112-1-git-send-email-paul.gortmaker@windriver.com> References: <1543811009-15112-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_WM8350_I2C drivers/mfd/Kconfig: bool "Wolfson Microelectronics WM8350 with I2C" ...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_init was not in use by this code, the init ordering remains unchanged with this commit. We don't replace module.h with init.h since the file already has that. But we do delete an unused moduleparam.h 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: patches@opensource.cirrus.com Signed-off-by: Paul Gortmaker --- drivers/mfd/wm8350-i2c.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c index 9358f03b7938..b4194e068e1b 100644 --- a/drivers/mfd/wm8350-i2c.c +++ b/drivers/mfd/wm8350-i2c.c @@ -13,8 +13,6 @@ * */ -#include -#include #include #include #include @@ -48,30 +46,19 @@ static int wm8350_i2c_probe(struct i2c_client *i2c, return wm8350_device_init(wm8350, i2c->irq, pdata); } -static int wm8350_i2c_remove(struct i2c_client *i2c) -{ - struct wm8350 *wm8350 = i2c_get_clientdata(i2c); - - wm8350_device_exit(wm8350); - - return 0; -} - static const struct i2c_device_id wm8350_i2c_id[] = { { "wm8350", 0 }, { "wm8351", 0 }, { "wm8352", 0 }, { } }; -MODULE_DEVICE_TABLE(i2c, wm8350_i2c_id); - static struct i2c_driver wm8350_i2c_driver = { .driver = { .name = "wm8350", + .suppress_bind_attrs = true, }, .probe = wm8350_i2c_probe, - .remove = wm8350_i2c_remove, .id_table = wm8350_i2c_id, }; @@ -81,12 +68,3 @@ static int __init wm8350_i2c_init(void) } /* init early so consumer devices can complete system boot */ subsys_initcall(wm8350_i2c_init); - -static void __exit wm8350_i2c_exit(void) -{ - i2c_del_driver(&wm8350_i2c_driver); -} -module_exit(wm8350_i2c_exit); - -MODULE_DESCRIPTION("I2C support for the WM8350 AudioPlus PMIC"); -MODULE_LICENSE("GPL"); -- 2.7.4