Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp992485imu; Fri, 7 Dec 2018 12:15:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/UZGk8rq73G6dY+SuJLTNHxvAV/WhC66EKdA+BM43o4oAiRr/Nf+sdgs2eNggJM625WDm7A X-Received: by 2002:a17:902:ab84:: with SMTP id f4mr3347373plr.207.1544213739722; Fri, 07 Dec 2018 12:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544213739; cv=none; d=google.com; s=arc-20160816; b=Xzkab60pc12zagOVVwJNuN8NcmHIcWQ/I5ytbf7y3bU4Us7WY9J6AhGj506SkB7Dfd inb5+J17oRDrKSMfkNQ2U/QhAdzmfHVEo+Sv81Up0fwaZSVNXdI2OhCrVFRqueNmqDE7 qjyETZ8u3HLCVEChzHlek51QIB6/KHN9KGi658ouf0PeU5puAkQJK0FlfZBRN2ukYvQA Wcr2LKvghDjSPNQ2xx4PBKYKHwCSd9gBM0dDw3SX6g+NLt2yHWGsgQepcjPywbaaQ+M8 TK1PnXnYDBeAS7v/tTDCvmLFS49mi9jek3QOoKASyty8oWDu/UIeqesT3kfBiDYHwsde ZiPA== 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=y9x4D56q9gaD0jx2/+KbPKUO9VQJomdXUsh+amp/4cA=; b=kcAbFSXPsmrCeKmLnEF9TkpnX9nT4iQezAsWr9LC2gpi9t+uFZC4DqfxwXOMVKTvxs CmQBxwpqfpudYMMIorlhAbF47czxg0k0gQ9Q75XzcTqEOMzQf0Bcts8W4AgesK2Seen6 lgtgwFOdaN9C4h/6dLgrLxl2AQDdjrUWjGE3l/ZArqgZKPrnSBNijTZP2syOABcSnm0s r/l52QFERO0ShaTCshlIwYs4gQ69VM3EGSQbR0uI/L6II8fOXKETj5ckUu6q4f0IoKAs rP0GeVa2LzElBNbl1NI24lDVE+GSt4wYk/e0I8EZIj9FmxjLoPjPFGArHrvdIQ1lvsRb 87pg== 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 u8si3637269pgl.25.2018.12.07.12.15.24; Fri, 07 Dec 2018 12:15:39 -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 S1726232AbeLGUO3 (ORCPT + 99 others); Fri, 7 Dec 2018 15:14:29 -0500 Received: from mail1.windriver.com ([147.11.146.13]:57420 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbeLGUO0 (ORCPT ); Fri, 7 Dec 2018 15:14:26 -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 wB7KEKSx029606 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 7 Dec 2018 12:14:20 -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; Fri, 7 Dec 2018 12:14:19 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Venu Byravarasu Subject: [PATCH 10/18] mfd: tps65090: Make it explicitly non-modular Date: Fri, 7 Dec 2018 15:10:57 -0500 Message-ID: <1544213465-16259-11-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544213465-16259-1-git-send-email-paul.gortmaker@windriver.com> References: <1544213465-16259-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 Acked-by: Linus Walleij 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