Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3492662imu; Mon, 17 Dec 2018 22:22:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/XbmTBbvgzYBWl7c9A0oa0P5d04OYlXCeurQ53XoFxzBvCZEa9FSm+8CtIqCwHe4ZO4OKR9 X-Received: by 2002:a63:85c6:: with SMTP id u189mr14138086pgd.156.1545114144177; Mon, 17 Dec 2018 22:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545114144; cv=none; d=google.com; s=arc-20160816; b=qd8hZ9IejhuKlekEKzbRNpg87I6tPH+2qQzut8h9bxwyAthLf8WE4M/y3L88vDxSa6 g+oSpbOyt+J+F3fud+2LQK583EVWReP/PS48I8DKEpF7xI8ipmoQ/abViBCRV+PSd0X5 f48BrIe3XZvBlsirKKcBud4wxhFtRHm6E/MANS3c6bSaMS65/OEF2ldInt5JkkNJyevb 0NpWoHU40L21vzUnUAgeYATm4CTFjpxVJMyQxt6VLCkWK9uvqmb+Tz1o0fHdM1MxM2AM 1BM3EhuYgtCoQuuCJBaNEDohOXMdWABqovXT0dLcv1HJIDH3QG3+HL94I0eYZH2UdVec 0Sdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=tzHGIOs8lDXYt4k5sYdUM6mGhkvC4ekQC56erETxbNQ=; b=PwJJngJ2CDC644eNoZIw8jBSTb9fCp8jP2EIuNK27ipMreK9/nRRJCqbXJ/ezFLtDE lvhSkog0lRrxmjP7mUaF497mQlgoux3wocwTxNQ2ivroXJOWoSvLNkIXw38+rkG1bFCj vw62XV7MMwcFF4V7pMd+YRJ+ZKtfVuBAxz1jyYkSHQlbUJ1+tKRGlP0QlPcEitE1nUP3 MVxjGU8IBwOLaxpQ0k3I31wyo9kMaxMcJTCTtH6VSbpauAXeQExENZLwGbWtuvvbnzya 7wGMg6bBPKIJwBzFa/XN1C79qCuVATr1fBTt9pnU8DwT5rW23VtJ/8c+vddKEbRlKi7M o5FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=T4iKTNaw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si12359366plp.130.2018.12.17.22.22.06; Mon, 17 Dec 2018 22:22: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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=T4iKTNaw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbeLRGVN (ORCPT + 99 others); Tue, 18 Dec 2018 01:21:13 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:3514 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726324AbeLRGVN (ORCPT ); Tue, 18 Dec 2018 01:21:13 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 17 Dec 2018 22:21:03 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 17 Dec 2018 22:21:11 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 17 Dec 2018 22:21:11 -0800 Received: from [10.19.11.86] (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 18 Dec 2018 06:21:10 +0000 Subject: Re: [PATCH 01/18] mfd: aat2870-core: Make it explicitly non-modular To: Paul Gortmaker , Lee Jones CC: References: <1545078688-21217-1-git-send-email-paul.gortmaker@windriver.com> <1545078688-21217-2-git-send-email-paul.gortmaker@windriver.com> X-Nvconfidentiality: public From: jinyoungp Message-ID: Date: Tue, 18 Dec 2018 15:21:08 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <1545078688-21217-2-git-send-email-paul.gortmaker@windriver.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL104.nvidia.com (172.18.146.11) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1545114063; bh=tzHGIOs8lDXYt4k5sYdUM6mGhkvC4ekQC56erETxbNQ=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type: Content-Transfer-Encoding:Content-Language; b=T4iKTNawWYqVF2gZmUiYtOovXmEFkh8bIgiF4FFpCUyKEimiCr2/kx1r7HJfzfAB/ zthQCxD1puAymcVW5PaTdmYHRpLGAy9XlEExNrvDgqimffaJu/DAy/XgD+DEOw3Bep FJFCwGJfQldzKNg6V924cz9wHaSMBgr4r/3HRpgG36Gy/UfOo4a3ykgLnOyrA+svuE j8h3VW+gAh2in636Y12v3MZC2+grnwzMvlE1rmwqpzCEs+FRAzvkHNmE7fRqO6U9o/ MUorGYk4ZivQS620XuGIaWaBFQeS1sff6xC3ONNgYYF4vdmUSuuRXpTT4wi2i+mbL2 1WK5P7Ptk964A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by : Jin Park Thanks, Jinyoung. On 12/18/18 5:31 AM, Paul Gortmaker wrote: > The Kconfig currently controlling compilation of this code is: > > drivers/mfd/Kconfig:config MFD_AAT2870_CORE > drivers/mfd/Kconfig: bool "AnalogicTech AAT2870" > > ...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 > is already contained at the top of the file in the comments. > > Cc: Lee Jones > Cc: Jin Park > Signed-off-by: Paul Gortmaker > Acked-by: Linus Walleij > --- > drivers/mfd/aat2870-core.c | 40 +++------------------------------------- > 1 file changed, 3 insertions(+), 37 deletions(-) > > diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c > index 3ba19a45f199..9d3d90d386c2 100644 > --- a/drivers/mfd/aat2870-core.c > +++ b/drivers/mfd/aat2870-core.c > @@ -20,7 +20,6 @@ > */ > > #include > -#include > #include > #include > #include > @@ -349,18 +348,10 @@ static void aat2870_init_debugfs(struct aat2870_data *aat2870) > "Failed to create debugfs register file\n"); > } > > -static void aat2870_uninit_debugfs(struct aat2870_data *aat2870) > -{ > - debugfs_remove_recursive(aat2870->dentry_root); > -} > #else > static inline void aat2870_init_debugfs(struct aat2870_data *aat2870) > { > } > - > -static inline void aat2870_uninit_debugfs(struct aat2870_data *aat2870) > -{ > -} > #endif /* CONFIG_DEBUG_FS */ > > static int aat2870_i2c_probe(struct i2c_client *client, > @@ -440,20 +431,6 @@ static int aat2870_i2c_probe(struct i2c_client *client, > return ret; > } > > -static int aat2870_i2c_remove(struct i2c_client *client) > -{ > - struct aat2870_data *aat2870 = i2c_get_clientdata(client); > - > - aat2870_uninit_debugfs(aat2870); > - > - mfd_remove_devices(aat2870->dev); > - aat2870_disable(aat2870); > - if (aat2870->uninit) > - aat2870->uninit(aat2870); > - > - return 0; > -} > - > #ifdef CONFIG_PM_SLEEP > static int aat2870_i2c_suspend(struct device *dev) > { > @@ -492,15 +469,14 @@ static const struct i2c_device_id aat2870_i2c_id_table[] = { > { "aat2870", 0 }, > { } > }; > -MODULE_DEVICE_TABLE(i2c, aat2870_i2c_id_table); > > static struct i2c_driver aat2870_i2c_driver = { > .driver = { > - .name = "aat2870", > - .pm = &aat2870_pm_ops, > + .name = "aat2870", > + .pm = &aat2870_pm_ops, > + .suppress_bind_attrs = true, > }, > .probe = aat2870_i2c_probe, > - .remove = aat2870_i2c_remove, > .id_table = aat2870_i2c_id_table, > }; > > @@ -509,13 +485,3 @@ static int __init aat2870_init(void) > return i2c_add_driver(&aat2870_i2c_driver); > } > subsys_initcall(aat2870_init); > - > -static void __exit aat2870_exit(void) > -{ > - i2c_del_driver(&aat2870_i2c_driver); > -} > -module_exit(aat2870_exit); > - > -MODULE_DESCRIPTION("Core support for the AnalogicTech AAT2870"); > -MODULE_LICENSE("GPL"); > -MODULE_AUTHOR("Jin Park ");