From patchwork Wed Jun 26 13:42:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Hunter X-Patchwork-Id: 1122799 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=nvidia.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nvidia.com header.i=@nvidia.com header.b="J/x0Ye7E"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45YkkT6kMwz9s3Z for ; Wed, 26 Jun 2019 23:43:13 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbfFZNnN (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 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-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@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 Reviewed-by: Bartosz Golaszewski --- 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; }