From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F567C48BD6 for ; Wed, 26 Jun 2019 13:43:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4573E2085A for ; Wed, 26 Jun 2019 13:43:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="J/x0Ye7E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727821AbfFZNnN (ORCPT ); Wed, 26 Jun 2019 09:43:13 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:16977 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726984AbfFZNnN (ORCPT ); Wed, 26 Jun 2019 09:43:13 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 26 Jun 2019 06:43:10 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 26 Jun 2019 06:43:12 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 26 Jun 2019 06:43:12 -0700 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 26 Jun 2019 13:43:12 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 26 Jun 2019 13:43:12 +0000 Received: from moonraker.nvidia.com (Not Verified[10.21.132.148]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 26 Jun 2019 06:43:11 -0700 From: Jon Hunter To: Linus Walleij , Bartosz Golaszewski , Thierry Reding CC: , , , Jon Hunter Subject: [PATCH] gpio: tegra: Clean-up debugfs initialisation Date: Wed, 26 Jun 2019 14:42:58 +0100 Message-ID: <20190626134258.26991-1-jonathanh@nvidia.com> X-Mailer: git-send-email 2.17.1 X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1561556590; bh=1QvTJ+i/3pGnKJ2oaxpkTtqqpxbadolSu4kWtM0U694=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=J/x0Ye7ExrC6TisZTW7YFyP5eOHtbq6bPkc4xPfY6TlZ297vvLXvSo6+x+v15lcK+ p9rIIZGLVOMUwE4NAKorbnbktdyHEFJH4t3ZjMRUtV+s2pWr3KS6feS8zeUmDDy0kN UwAogVzClCIxa+zYTZiko3LgAUibxelO7yzjxzWOghRjWLeH4mOQvknmHD3oPPqUej 4pbKVxf0q32eNG/Q7O9U+AB5Tu0N/5F3UTkhcICC3FzcfarLIPgNJMR6yDm/CSORjF ijELy3w27uaqv5B7cOrS73NaY6RCRynGkzANXat/BDXGv4C+77q4xLDZvAUQhdebtB IilDGAgQAMguA== Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The function tegra_gpio_debuginit() just calls debugfs_create_file() and given that there is already a stub function implemented for debugfs_create_file() when CONFIG_DEBUG_FS is not enabled, there is no need for the function tegra_gpio_debuginit() and so remove it. Finally, use a space and not a tab between the #ifdef and CONFIG_DEBUG_FS. Signed-off-by: Jon Hunter --- drivers/gpio/gpio-tegra.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 0f59161a4701..59b99d8c3647 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -508,7 +508,7 @@ static int tegra_gpio_irq_set_wake(struct irq_data *d, unsigned int enable) } #endif -#ifdef CONFIG_DEBUG_FS +#ifdef CONFIG_DEBUG_FS #include #include @@ -538,19 +538,6 @@ static int tegra_dbg_gpio_show(struct seq_file *s, void *unused) } DEFINE_SHOW_ATTRIBUTE(tegra_dbg_gpio); - -static void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) -{ - debugfs_create_file("tegra_gpio", 0444, NULL, tgi, - &tegra_dbg_gpio_fops); -} - -#else - -static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) -{ -} - #endif static const struct dev_pm_ops tegra_gpio_pm_ops = { @@ -675,7 +662,8 @@ static int tegra_gpio_probe(struct platform_device *pdev) } } - tegra_gpio_debuginit(tgi); + debugfs_create_file("tegra_gpio", 0444, NULL, tgi, + &tegra_dbg_gpio_fops); return 0; } -- 2.17.1