Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3099487imu; Mon, 17 Dec 2018 13:18:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/XJLugiq5vnNcY7kxrCAZHWiWP3tzVXoKKFsukKuhDIVkmaOcY4pWOzf8VMeQjYbmrhJyKt X-Received: by 2002:a65:60c2:: with SMTP id r2mr13545536pgv.393.1545081525894; Mon, 17 Dec 2018 13:18:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545081525; cv=none; d=google.com; s=arc-20160816; b=FS1DlQ/PoZjtOBNaen4XaLwfwA4RAFvxEXY9rvNL9ankgHzGHO26voTyjnKF0X6dNb bYgU6XaGcDZ2N8PP8y3OpVr49oCoOBnaM/dMUH9gPNEM6JVVrRjdGhIEO18jHthXgZv0 fl0w76ao41n8JnEcuKXDiEZ1e/uZWc6mDwtZte0PwMy1N5gF67hO1Gcz+7OTUvWfevSn yRHK+4CYLva0+4PkjAoGE2F9+kZCKJBCqUnkDFpMrTWKaAX/mdb8FEqqjhCa0nGmPqJQ KpFTsAtPkzqryPCPgihffMaHGqjgo/rdAjHqsUQgMiWtbz/Byu1uKgP5oqMYoWaacs70 Kn3g== 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=C9GMBGaIUm+1BOl9+tqvsubJF+J8UUWq95JmKWlyDE8=; b=IHYPWsXa0CODbA56osUO3PGvlROjWk6gUvnzZh2CwATfeLK7o8jRUjpW0xDyL3//sL QdC1j8SEbyMSxXtEa1zZtJYKojHRbMSceEZEk0eLUUKkG5jSzx4Lo2It9l7A/381nLDa D2bGENnH1rLbODnPKAq/xxFKDGnghrsI+Yg/0xcG8IwC/nUIXt4c726FIMfnaC7wZNNp QLFRAldv4qbDfxz0mX13BL1zEk0kNUescxuJEpUtvSO4YOzuyJzjEtBz8JdPcQlNtubA sgNrFTZ1DO7S40/Gu0AIXkiCdbfIMXwgjEseZoXmSdGubzuGi4uyq6N7HgRjaLUtvmNI hcDQ== 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 d11si3025564plo.184.2018.12.17.13.18.30; Mon, 17 Dec 2018 13:18:45 -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 S1728079AbeLQUgk (ORCPT + 99 others); Mon, 17 Dec 2018 15:36:40 -0500 Received: from mail5.windriver.com ([192.103.53.11]:42818 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726682AbeLQUgk (ORCPT ); Mon, 17 Dec 2018 15:36:40 -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 wBHKYMBY030343 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 17 Dec 2018 12:35:59 -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:35:42 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Laxman Dewangan Subject: [PATCH 12/18] mfd: tps80031: Make it explicitly non-modular Date: Mon, 17 Dec 2018 15:31:22 -0500 Message-ID: <1545078688-21217-13-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_TPS80031 drivers/mfd/Kconfig: bool "TI TPS80031/TPS80032 Power Management chips" ...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. 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: Laxman Dewangan Signed-off-by: Paul Gortmaker Acked-by: Linus Walleij --- drivers/mfd/tps80031.c | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c index 608c7f77830e..865257ade8ac 100644 --- a/drivers/mfd/tps80031.c +++ b/drivers/mfd/tps80031.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -516,40 +515,18 @@ static int tps80031_probe(struct i2c_client *client, return ret; } -static int tps80031_remove(struct i2c_client *client) -{ - struct tps80031 *tps80031 = i2c_get_clientdata(client); - int i; - - if (tps80031_power_off_dev == tps80031) { - tps80031_power_off_dev = NULL; - pm_power_off = NULL; - } - - mfd_remove_devices(tps80031->dev); - - regmap_del_irq_chip(client->irq, tps80031->irq_data); - - for (i = 0; i < TPS80031_NUM_SLAVES; i++) { - if (tps80031->clients[i] != client) - i2c_unregister_device(tps80031->clients[i]); - } - return 0; -} - static const struct i2c_device_id tps80031_id_table[] = { { "tps80031", TPS80031 }, { "tps80032", TPS80032 }, { } }; -MODULE_DEVICE_TABLE(i2c, tps80031_id_table); static struct i2c_driver tps80031_driver = { .driver = { - .name = "tps80031", + .name = "tps80031", + .suppress_bind_attrs = true, }, .probe = tps80031_probe, - .remove = tps80031_remove, .id_table = tps80031_id_table, }; @@ -558,13 +535,3 @@ static int __init tps80031_init(void) return i2c_add_driver(&tps80031_driver); } subsys_initcall(tps80031_init); - -static void __exit tps80031_exit(void) -{ - i2c_del_driver(&tps80031_driver); -} -module_exit(tps80031_exit); - -MODULE_AUTHOR("Laxman Dewangan "); -MODULE_DESCRIPTION("TPS80031 core driver"); -MODULE_LICENSE("GPL v2"); -- 2.7.4