Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3199278imu; Mon, 17 Dec 2018 15:20:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/U2VzvbWmVgE8zMc7XHH1vAE706b9pkRpGUU9Iuhpp9QI3eP63gg7XQll90CQBpzMfyX4Am X-Received: by 2002:a65:65c9:: with SMTP id y9mr14131471pgv.438.1545088825926; Mon, 17 Dec 2018 15:20:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545088825; cv=none; d=google.com; s=arc-20160816; b=KX7atW3M/7bj3yLiFbIaNqGRcpjCXrt2pRljJrWbe/RJRHmD802WYxgV/5GMHY2Ay+ RDOM8mdw5jvpN1Rz8Fv5WwwB/uvfcG5EUaOQbLrCNOYJZGDS9Pl+Eu6sjutzd/MvPlg9 J29U1TCLMeBYdKlIARjZdyROEkVy0hW74e+MGj7YRMXXuhHIHx0EaWZkqy1EkWzoHw8H YPBUmp2+5E5/MhUOerx4eDSsoM7QPUAVnh9WGMJZAlzhRutNkVh2g/eur6xymf/teNlM Y5AL7CMYv6zvdpDRQd70RV0boNoQ/cJS388b+3r+ZsYWi4QRHCkNTkJe8Pg1bBZUbezn XFoA== 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=n5t9hd9dRXzJ2HxWlw19j29v8QqJks0hZ+AfmbqZ6TI=; b=B4BDu9ItTCcTenCTCHDdgdV/dyoKRQxdXvF1IxFFUzfiClGOI/f7nKV8td2FuN6Cr2 erixZOWBOk3JJD1kQm9T6KEqa/dJPSrRuAwIM3LgaHiiJAek+WJeiFFvZAAzjgLn/+nS ctxxLbULi2TsVyUsgM2Aw/oDmejBx6nPiwj7cLjwd7T3qWd/lMTq/EosHXCDlUfoWSVY tmV5BsKVUIDlUXxE7qrdr0Wzm2bIxJ+oQC8NNBy+N2iIiwbwnCOnN0o7/ruEOm+VASMF WzWJ5kSDnqKxsUWzW9O9lFaWMBHRhWyWbToFoeS+DRy4y79CfIyiiuTCYw8j4EbXOSdD wmNA== 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 k38si11825331pgi.235.2018.12.17.15.20.11; Mon, 17 Dec 2018 15:20:25 -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 S2388092AbeLQUfo (ORCPT + 99 others); Mon, 17 Dec 2018 15:35:44 -0500 Received: from mail5.windriver.com ([192.103.53.11]:42778 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726846AbeLQUfo (ORCPT ); Mon, 17 Dec 2018 15:35:44 -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 wBHKYMBP030343 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 17 Dec 2018 12:35:02 -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:34:42 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Venu Byravarasu Subject: [PATCH 10/18] mfd: tps65090: Make it explicitly non-modular Date: Mon, 17 Dec 2018 15:31:20 -0500 Message-ID: <1545078688-21217-11-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_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 Acked-by: Linus Walleij --- 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