Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp996283imu; Fri, 7 Dec 2018 12:19:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/VQUV9E+adFBa4t4oSvUPuIejwx4IfNv9oLoQTKwJK/ucCRjXs5t/wzEm0mO4YRiuTyK61C X-Received: by 2002:a17:902:2e01:: with SMTP id q1mr3343982plb.97.1544213963866; Fri, 07 Dec 2018 12:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544213963; cv=none; d=google.com; s=arc-20160816; b=K7uafF6kK7QE5AfKlawpViSxD0SLN97f5Zhk/6phaNR30/RkmTfoP7irk3yMsALwP7 rSfQL2hMFERF1cZCwy8G072afW2Zt5vTabF+54Rf3Cr8g6OQpcKNs1d0Mh/XQ8/KhcDw 7VS//Y/KAx5leXu5SRaLJeXtxPqiy0o5aYLw89DgYK5Nbmnzl/f8KOYF4L4m+IZU7mL/ mdeptDKbr2eb9+KbTYEHGcU7mOZcB29PoZgfq/1N2S4myWTQOk4gvoSsv3u5Y/aMkD1/ 4vjRXhD+GJj78ptjxOTo+W0ij8safeIMl3W5AnH94qMZg2fdg+vXSDI4wx8cyOmH/lXw US/A== 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=5rku6VcluIoWjCWZg3Hfw9jj+TBjHcCLVBXltZvqN6k=; b=uZMYNlQnNj4vP7/SMPgb5W5IUAI0GLebXglPyu1Xea2TU21jI+IrKGtBm9ITD1yvfE h3Y3+9P1X6yFsOilLbh+jEcWTb5e9eTibLQlEIAfI+Gdkto9zXsKYPBTN/3yJt0ZucdQ GGJZjspY1zk2j2NrCdSICFYOyhJRnz3CbonNAt9HvAR1ffqpocKRC+xlnamBJTrybeOR EGaFYU3OaAhiFSL4KthhL5ZW9QaLPryBCdvIm6yFNRdcsjEXk0pW2NAbi0H4Zd+/qyxn jIBqsppv6cpmCVltjPnQaSnJdVH7wNApFwwP4irEGIeOv0bjNooz/YshRaHUqYjrk8xE /zcg== 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 l30si3720942plg.113.2018.12.07.12.19.07; Fri, 07 Dec 2018 12:19:23 -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 S1726276AbeLGURK (ORCPT + 99 others); Fri, 7 Dec 2018 15:17:10 -0500 Received: from mail5.windriver.com ([192.103.53.11]:59268 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726214AbeLGURJ (ORCPT ); Fri, 7 Dec 2018 15:17:09 -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 wB7KFG61031397 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 7 Dec 2018 12:16:17 -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; Fri, 7 Dec 2018 12:15:40 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Subject: [PATCH 16/18] mfd: wm8350-i2c: Make it explicitly non-modular Date: Fri, 7 Dec 2018 15:11:03 -0500 Message-ID: <1544213465-16259-17-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544213465-16259-1-git-send-email-paul.gortmaker@windriver.com> References: <1544213465-16259-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 Acked-by: Linus Walleij 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