Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2869328imu; Sun, 13 Jan 2019 12:02:55 -0800 (PST) X-Google-Smtp-Source: ALg8bN4hJkbe6rRywTD2JR05A0WxtaAlgyaEOfSUEztvYTD6Ggc/PKF+Q69yEUhs/4jnfLWyeV+c X-Received: by 2002:a63:c0f:: with SMTP id b15mr20759540pgl.314.1547409775803; Sun, 13 Jan 2019 12:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547409775; cv=none; d=google.com; s=arc-20160816; b=QtaGY0J91B9/ro9E72eEelTc4+j9+3u3eBJ8pR8EaKA8WdV7Jn3N77kEX6W4ebzykD uCJIkwZwb2SIRovP8cVpnjWa7dNZFlWVCIfrzdq/lQJMcNJBl78/sM/KZm24YqMU+0Po 51jBhfhGVS4VcSY5d8Qeeg5CJYNY6X+BODBWukLu/TFqglF4+dECfZQjykBbbnSYt+hN IOE5thBHxRA0bwmhC/WNUvRzwMtnOS0/TJWXa3q/wyNCfwjOJ72dogv2Uwp/zcGLBnHO vIBFecv48/8+Em2REa2QFXczsjiRqJaYHvdnvPHf/tXcoz9/W4D5VNiatSkVouuEawLj e84g== 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=iIQxoFIsoybExjFvqx4UU/sXuKskrJJJffx6b1LkEjA=; b=B+BaWVTlI8V1icQWbrR7JRhXqfgkU89zFeETJSlaphlidWYbZTZsLAhCeZvDTQdbfB FT0MgZnuDuhzufDSvI7No/MqNCelw4fOQfXHLxpaYDBrfe6bygvNzya7/3eeiVAV698C ncgRIvfzSqyFlMeHDYuMB4G0ElUtfkawB6Y5gbg1bQJY+QF3MP4wFd8m0kcWY7wRf08Y WTvJgY7EQeZhypKrFQHoCHYK+PnZtfvFnpLih0o1wZ5oo7fy655O7AYsBWjo5cnrYY/C xYYAP/N14VepmqyulRY8RFznXz5xeHTPaL98zZr6HpHdTc375UIf4nUVaJm3/CQ6uK1H JPiQ== 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 q64si20914822pga.280.2019.01.13.12.02.40; Sun, 13 Jan 2019 12:02:55 -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 S1726756AbfAMUAp (ORCPT + 99 others); Sun, 13 Jan 2019 15:00:45 -0500 Received: from mail5.windriver.com ([192.103.53.11]:47592 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfAMUAn (ORCPT ); Sun, 13 Jan 2019 15:00:43 -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 x0DIdtvS025176 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 13 Jan 2019 10:40:41 -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, 13 Jan 2019 10:40:20 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Subject: [PATCH 16/18] mfd: wm8350-i2c: Make it explicitly non-modular Date: Sun, 13 Jan 2019 13:36:47 -0500 Message-ID: <1547404609-14161-17-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547404609-14161-1-git-send-email-paul.gortmaker@windriver.com> References: <1547404609-14161-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 Acked-by: Charles Keepax --- 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