Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6515048imu; Sun, 2 Dec 2018 20:29:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/W6f/uCuIS9ZqNURp6dmRzW9touQ7UrvufcYcckEOK69S2ZApJ5fK2lyfc3XkSiW+ptHtRS X-Received: by 2002:a65:60c2:: with SMTP id r2mr11030554pgv.393.1543811390446; Sun, 02 Dec 2018 20:29:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543811390; cv=none; d=google.com; s=arc-20160816; b=bShqrTr78kbm5NOuvb8aTNAehtuHvnvYiz9nXXxVTqqEQxSwd7lBowirnGk6+2VURu KVFWZU57Lx3UnfS303ciWm4dV8t9zs6Z5whIh0TwyPBQqy/WlgjPzWl9iyAbGI700wCr AjcIZmoN/YoSWY0FoStMLlVbbMZND+cc40jLxW46d4gLty1K9mu54+sqVxC2+pr2sWR5 DoukDf1FQborGm4l08qIYZmy1cIUoPjUceDOIXI0rUzKY/4VJQaxaWbofBxadQpJ53NN 1qeIj+E9agCz54DD/ZAlJAd2jwQ7Iho93aIz+r2K5KxJtWuofCnt992Fjzn6GoGnZxLU M+aw== 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=g35YSlFUnMtd8UgN/7qyLvbEVYyCYAbcuurl5W7cUvU=; b=kp1IP++Skd82bpLR6S0uzybhrIw6opERfJFcxEZHWXnbKPBdtIqsstgLvIcXVUrHsv 4FhK7LrjcBVQGmjnHoqoaC4PIJzcnRcjRtqiVZU0F2/u1opuB6Ejh7Yn7QL4xvQHpUQG IUWeuMmlTqRC8NnVS4PjTz9A82D62MHrrm3LvFvcCzeoiTq0wsLfVGsZ5OXRcuiocxsz nWyGVZP1j0nqvwCwHAGk4tPP114uwEZOWtEyU1ZJgGvPSvp5X58F8tMMnFQwz9KBjWDf Dp8i88XruTPREm6geW6nlzHueI7rU/ILYY2mgEYzOxQq70HAXJslIeRzLzYkpQRILbmu uWKg== 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 bi2si12589099plb.200.2018.12.02.20.29.35; Sun, 02 Dec 2018 20:29:50 -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 S1726088AbeLCE1E (ORCPT + 99 others); Sun, 2 Dec 2018 23:27:04 -0500 Received: from mail1.windriver.com ([147.11.146.13]:60561 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbeLCE1D (ORCPT ); Sun, 2 Dec 2018 23:27:03 -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 wB34QuHH015539 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 2 Dec 2018 20:26:56 -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:26:56 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Laxman Dewangan Subject: [PATCH 16/22] mfd: tps80031: Make it explicitly non-modular Date: Sun, 2 Dec 2018 23:23:23 -0500 Message-ID: <1543811009-15112-17-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_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 --- 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