Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6513097imu; Sun, 2 Dec 2018 20:26:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/X+YMZ/E22xl7tfS/sWI1SKZo0Iro7WBYZhtxE7CUqQSu7mV57EBSqSQ53d/UnUcQ7blYdv X-Received: by 2002:a17:902:7044:: with SMTP id h4mr14353466plt.35.1543811165953; Sun, 02 Dec 2018 20:26:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543811165; cv=none; d=google.com; s=arc-20160816; b=uY3itWahNmirfPs+eFgJleMWMike+nkktui+gdLO4oB8enRlaBUucs2lFyqz3a0Bk2 OcBRCoeDE4e+7jwssT8tQz41w+IsouQ+f/5xfJJdhJucAYqurzavAJ9G93Kjiwk7chKM p/6B6XljUE5b/WJC1SdGkoAlazOLOQFe5sdh0I4QjGFYKVNLFJ2U6wIL8lvNU5HRbv7U +n5BellF7I+eaZaSq4jAI/6ptFXMRr/MlWvmYAhE/9CDvNA7XuO9CpoSjkkJ76eIgJTh Fo9VeFrQ+0RcwKZTV7MYVuIHudac3PZCIPaun4rUriI9lJZff23IyrC8LuCEycNVL8RB 9fzQ== 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=NEfXHBFF+Vs49GYXzEtrK6jjZubNubweqhDMaPJwkUQ=; b=MBHo89vJPLi5LsB6/ZK7dHBhGL/C/Qka7kiSkeooI4H/7GLbE76VTwhkUIGyYGJFpe htsOToweAw3Qttk1Sz40AqCJnLMj1a7GMvis5zDp8cZ5oR8T5Lo/sfWHD1Tp4Ix8GH11 CXoXqz6WbzyUa4vg07P9Jr2JIl2E0SPv2I+acqjBzdRwaKWcnoR1BZJOuvuSy2o7ywjV 3TYs3JS5HnLJFSOs0oIUjGPVkLsZmtwG1K5ojystdkdOH99Ovn/UBY9wdaYNM+yeJB9a GIKJbpU5Y9w/WseB0bbFiP8zZgAMVi14gDcYmoeL//lnfnYJ5JQkwmXsg0gE2Yy6+9JA Sf5g== 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 t1si11846211pgj.542.2018.12.02.20.25.51; Sun, 02 Dec 2018 20:26:05 -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 S1725944AbeLCEZI (ORCPT + 99 others); Sun, 2 Dec 2018 23:25:08 -0500 Received: from mail1.windriver.com ([147.11.146.13]:60533 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbeLCEZI (ORCPT ); Sun, 2 Dec 2018 23:25:08 -0500 Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id wB34OIGj015514 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 2 Dec 2018 20:24:19 -0800 (PST) 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:24:18 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Support Opensource , Eric Miao , Mike Rapoport Subject: [PATCH 04/22] mfd: da903x: Make it explicitly non-modular Date: Sun, 2 Dec 2018 23:23:11 -0500 Message-ID: <1543811009-15112-5-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 PMIC_DA903X drivers/mfd/Kconfig- bool "Dialog Semiconductor DA9030/DA9034 PMIC Support" ...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 replace module.h with init.h and export.h ; the latter since this file does export some syms. 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: Support Opensource Cc: Lee Jones Cc: Eric Miao Cc: Mike Rapoport Signed-off-by: Paul Gortmaker --- drivers/mfd/da903x.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c index 09f367571c58..78edb0558a0f 100644 --- a/drivers/mfd/da903x.c +++ b/drivers/mfd/da903x.c @@ -13,7 +13,7 @@ */ #include -#include +#include #include #include #include @@ -446,7 +446,6 @@ static const struct i2c_device_id da903x_id_table[] = { { "da9034", 1 }, { }, }; -MODULE_DEVICE_TABLE(i2c, da903x_id_table); static int __remove_subdev(struct device *dev, void *unused) { @@ -535,20 +534,12 @@ static int da903x_probe(struct i2c_client *client, return da903x_add_subdevs(chip, pdata); } -static int da903x_remove(struct i2c_client *client) -{ - struct da903x_chip *chip = i2c_get_clientdata(client); - - da903x_remove_subdevs(chip); - return 0; -} - static struct i2c_driver da903x_driver = { .driver = { - .name = "da903x", + .name = "da903x", + .suppress_bind_attrs = true, }, .probe = da903x_probe, - .remove = da903x_remove, .id_table = da903x_id_table, }; @@ -557,14 +548,3 @@ static int __init da903x_init(void) return i2c_add_driver(&da903x_driver); } subsys_initcall(da903x_init); - -static void __exit da903x_exit(void) -{ - i2c_del_driver(&da903x_driver); -} -module_exit(da903x_exit); - -MODULE_DESCRIPTION("PMIC Driver for Dialog Semiconductor DA9034"); -MODULE_AUTHOR("Eric Miao "); -MODULE_AUTHOR("Mike Rapoport "); -MODULE_LICENSE("GPL v2"); -- 2.7.4