Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3199565imu; Mon, 17 Dec 2018 15:20:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4LvRf3Wl7WguPFTsRp0/t8wC0eRkhmEHTC6VR8k8oT/II9SIs3Pt65HcfiaNZyMT60BmE X-Received: by 2002:a63:c051:: with SMTP id z17mr13519650pgi.20.1545088847939; Mon, 17 Dec 2018 15:20:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545088847; cv=none; d=google.com; s=arc-20160816; b=y7pU8rkU39KIcfwJX7UOb3zsvKT9omWTO1eAGDupE7unI7YykLnOybqe1WlpHRiv+c 3f8zCPY0KXCW12YuKv/3VEMKeZ9a4wKR3VxJkMH2/nJvB1rqj1y71vkfla9Lcyj5N4cD M7oh5Ur1HqqmmnpxC9O5bnOLDfqI/XHepyFuX0ApLzCMZHiw7mkbFnqVV0cX1Gjz1H8u sMrQi1crdv8NZOwplloQVek4OIOyBSZQHTr6lBD/7Z51rq56HzfJiPkOcUaRNCY690sg SeeUbMTWQqbwXEOt4Es0aBXgbHBbLoOTJ0lcnluAqf+8T+GDUZRHUfdqNqTKWJxX5oTK Vi/g== 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=hlMxxRHX+O6OUD7LuM6uXSSlXC5P3hTvYBKh9CI5hKU=; b=qpsTopMG0hVlMTG43PDCO5z7bRccVF7JHhpgwP6a5RtThnBjKMa62Dg2pcQ8AWIEGc 4CDQSCfTw0u7eFJFSyr7NaHRS6i5+QI3r7TtKFuCMbjeH8bDOjyEElsABbx26/yg1lCW pNWjIP8uCsKvrSf8UKAoEEdrGcbj08/ByXhDx9/vARNZx7N/EBCvrwbyx7jC0RLPLbmY dZw2NQDPTJigmCDBpkax28GJmbTLElMQZveeT24kslLEfhKRBqofvP9+Dqx+lioKhsRj broVDH53n8nokatvU+q4jbRGbi2UUjPtmWCbqNqMUUagSBzCysYFlmFplzlS/rtQzCp8 FmCg== 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 r10si11678029pgg.143.2018.12.17.15.20.32; Mon, 17 Dec 2018 15:20:47 -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 S2389169AbeLQUhw (ORCPT + 99 others); Mon, 17 Dec 2018 15:37:52 -0500 Received: from mail5.windriver.com ([192.103.53.11]:42868 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726710AbeLQUhv (ORCPT ); Mon, 17 Dec 2018 15:37:51 -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 wBHKaDBe030388 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 17 Dec 2018 12:37:14 -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:36:37 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Subject: [PATCH 16/18] mfd: wm8350-i2c: Make it explicitly non-modular Date: Mon, 17 Dec 2018 15:31:26 -0500 Message-ID: <1545078688-21217-17-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_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 Acked-by: Linus Walleij --- 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