Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6514840imu; Sun, 2 Dec 2018 20:29:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/X8Dk4ah/Olr1AQoqieDJXj8O0/eltK57ss4alVWxxGkA9GXw41AB0wvko8GnxHVlJxaj0e X-Received: by 2002:a17:902:1e9:: with SMTP id b96mr14591314plb.150.1543811364896; Sun, 02 Dec 2018 20:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543811364; cv=none; d=google.com; s=arc-20160816; b=z7XAr543Bvwgouxn2i3Mf7hQUsrpBMJ4LluTKL5A16l8Hd/UtxTgioPhP1LwgBuxAP tYYclHnar1HwfuFkYfwC8JJQfLV++mOGtliX7VJm6vs0sCFARIkVbvqMx6HzraMTpsRw Eqb01ngKmngUWtCv3bk+xxaTEqVY4ymaCyfU8OmsRYdyMWfKf+WKKkxhfzZbtF+Rzpeo FETm76F/qHvJCYfFAj8O27AgDqMFEJE78xtyPfjdgCzICCBcvX9c7FDrLGduddJO6/6Y kW5stpPSqTQTc8DnAmTr2Y5uAPmNRSj5BLGF3JT+xuz+APgRf3S7E5rZx8/yjlBwHrra GlhQ== 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=xYA4/V10jL+3zMHfzSvJHh9OFTHAunVO+OXkuPOyi1Y=; b=FzPaAWiJe0tTrw+JNvDhBRHBy08/RKSxMyMOq9jAzK+19jBi5BnoRlfQJ87gYLLuMs C903uDVnMUe6TiAf4g+z0HhzPLikWQEwUAmMLd+o0YENIEpsc+iIas5mPqdIqsPdyQVN Sd+d13ZHfCqrAkdqhRZ3ayOa5PygxhHjyl2IXnvIYujfS20rrFmBEe0yfR4VAgihc8mJ 0NKp90skKHiWRncDiJP4DH10wimeK6L8pjrWVRR258+/KwN7PTCX1ePz79BjO33cwPJU Bv62nBb9eHYe4Vk2HVaRSqORsVmDYMIIhdXewZwfkYLOrWZRwPPskGS3NyghikXTG6/U UBPA== 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 i23si12059632pgb.116.2018.12.02.20.29.10; Sun, 02 Dec 2018 20:29:24 -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 S1726065AbeLCE1c (ORCPT + 99 others); Sun, 2 Dec 2018 23:27:32 -0500 Received: from mail5.windriver.com ([192.103.53.11]:55242 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbeLCE1c (ORCPT ); Sun, 2 Dec 2018 23:27:32 -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 wB34QY1H018283 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 2 Dec 2018 20:26:44 -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, 2 Dec 2018 20:26:23 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Venu Byravarasu Subject: [PATCH 14/22] mfd: tps65090: Make it explicitly non-modular Date: Sun, 2 Dec 2018 23:23:21 -0500 Message-ID: <1543811009-15112-15-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 MFD_TPS65090 drivers/mfd/Kconfig: bool "TI TPS65090 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. 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 was (or is now) contained at the top of the file in the comments. Cc: Lee Jones Cc: Venu Byravarasu Signed-off-by: Paul Gortmaker --- drivers/mfd/tps65090.c | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index f13e4cd06e89..6968df4d7828 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c @@ -2,7 +2,9 @@ * Core driver for TI TPS65090 PMIC family * * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. - + * + * Author: Venu Byravarasu + * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. @@ -19,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -171,7 +173,6 @@ static const struct of_device_id tps65090_of_match[] = { { .compatible = "ti,tps65090",}, {}, }; -MODULE_DEVICE_TABLE(of, tps65090_of_match); #endif static int tps65090_i2c_probe(struct i2c_client *client, @@ -236,30 +237,19 @@ static int tps65090_i2c_probe(struct i2c_client *client, return ret; } -static int tps65090_i2c_remove(struct i2c_client *client) -{ - struct tps65090 *tps65090 = i2c_get_clientdata(client); - - mfd_remove_devices(tps65090->dev); - if (client->irq) - regmap_del_irq_chip(client->irq, tps65090->irq_data); - - return 0; -} static const struct i2c_device_id tps65090_id_table[] = { { "tps65090", 0 }, { }, }; -MODULE_DEVICE_TABLE(i2c, tps65090_id_table); static struct i2c_driver tps65090_driver = { .driver = { .name = "tps65090", + .suppress_bind_attrs = true, .of_match_table = of_match_ptr(tps65090_of_match), }, .probe = tps65090_i2c_probe, - .remove = tps65090_i2c_remove, .id_table = tps65090_id_table, }; @@ -268,13 +258,3 @@ static int __init tps65090_init(void) return i2c_add_driver(&tps65090_driver); } subsys_initcall(tps65090_init); - -static void __exit tps65090_exit(void) -{ - i2c_del_driver(&tps65090_driver); -} -module_exit(tps65090_exit); - -MODULE_DESCRIPTION("TPS65090 core driver"); -MODULE_AUTHOR("Venu Byravarasu "); -MODULE_LICENSE("GPL v2"); -- 2.7.4