Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp993803imu; Fri, 7 Dec 2018 12:16:52 -0800 (PST) X-Google-Smtp-Source: AFSGD/VyKkux0TEmYwvcuGWxRaqnLoRAXsZRO49P1XERhKTgfe7LQ77v8qz1+grN4UfL46/BvQF2 X-Received: by 2002:a63:ef47:: with SMTP id c7mr3214010pgk.386.1544213812413; Fri, 07 Dec 2018 12:16:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544213812; cv=none; d=google.com; s=arc-20160816; b=pEK7y1kGah+iQH7K9j2mwkoYXM9pYwOiXuxv5awqEqQmLAIlhoIUL+RMNrthk5nJ7i oy5YR8WqO1RvCJYYNQJKCe3Rc6IYy3MKLOGUvnKsOaYmf2M8+xCsvOI6xdO76KbBanl1 54nittIChT/yHe9Fi3EMyPVUhNG1ik/mSZPQvG5VoFgHuScRjEkb0j+Plnjhji41y4Cm +s5OHggh8NXXo8K5wO62xGgB5cNwQRan16JbBfWDwhclyJBuJSt0xSEnrQ0dic99droz HxRsXkUKu/lWEQXIyq0N2kEYqFSrBiWxPMsfrB1BBMc090RXflxNDbjg6GccAuFVBL2P nDxA== 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=AodDOXMa/dPQaLcLRCHtlcu3/eND+3WACaDPcUcbQHo=; b=Pmzxl/hjItll5yTXv49k/iR5Dda7fEa2Y73PHrfAf3LEsjpymPCVubaaHnWfjYmDxJ OOvf4wEgPurNrAvKwwPS5zlThioLhSUAK47aX9sUkPPe+0WReSpHmaqzPVTwGzKTQ67c H5Nku98JWDpch1i0SUBcqF2UydppnQHv50t771cP8P9gEzav9ERjVOKBjUOu6qfKoCec qcYduE6qQJT2hyY5dw/RLS6IaliyplDhKhCbuUrufRxR7nmfXNLLfVsdmGszchmJGxLc wNq8pEw1R3oQvbbKO3/b5WF9b5Finh5aCdiTnBmstUee027okZ+2QNaCWJaGv7X4Ach0 8Zwg== 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 y141si4223453pfc.180.2018.12.07.12.16.36; Fri, 07 Dec 2018 12:16:52 -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 S1726308AbeLGUPe (ORCPT + 99 others); Fri, 7 Dec 2018 15:15:34 -0500 Received: from mail5.windriver.com ([192.103.53.11]:59216 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbeLGUPe (ORCPT ); Fri, 7 Dec 2018 15:15:34 -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 wB7KEVll031359 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 7 Dec 2018 12:15: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; Fri, 7 Dec 2018 12:14:55 -0800 From: Paul Gortmaker To: Lee Jones CC: , Paul Gortmaker , Laxman Dewangan Subject: [PATCH 12/18] mfd: tps80031: Make it explicitly non-modular Date: Fri, 7 Dec 2018 15:10:59 -0500 Message-ID: <1544213465-16259-13-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_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 Acked-by: Linus Walleij 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