From patchwork Wed Apr 8 16:54:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6181541 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55DC3BF4A6 for ; Wed, 8 Apr 2015 16:55:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E327A2037A for ; Wed, 8 Apr 2015 16:54:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AF35A202E5 for ; Wed, 8 Apr 2015 16:54:56 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id A22CF265554; Wed, 8 Apr 2015 18:54:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0118B265388; Wed, 8 Apr 2015 18:54:47 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4E0AE265469; Wed, 8 Apr 2015 18:54:46 +0200 (CEST) Received: from mail-vn0-f48.google.com (mail-vn0-f48.google.com [209.85.216.48]) by alsa0.perex.cz (Postfix) with ESMTP id 1E6CA265375 for ; Wed, 8 Apr 2015 18:54:39 +0200 (CEST) Received: by vnbg190 with SMTP id g190so14580377vnb.12 for ; Wed, 08 Apr 2015 09:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=hhLti+fzG8KU0rJhg2xaBeiRNYX0y4DzBuZEVsdKdCQ=; b=vGD131YaxoSRtTIZMogoAh3B4SlvsR3rQ0g7xJxAGpBOmQOzoMp/iOQLaCutfwfY6Y /yjAoGM75T1VnoNs7whA/aW+pCTvj6mwWI6VJdrOf5fAUPhpbZv+NQaEc6ITX5adGiPS J3N+ITJcslFOBpD4pBiGEw+cOxG8kly1jDGKLl/Zig6wVApNn3TIwwJlsBm++rh6nXAM R8nX4aC630rxZR+Nf+xy8fMnrjcn+A0UdfNu/leqDWBbWF1X1I+yIlUC+O4Za6GXOFqN ZpcS6vdJQHjGb4U4G/UefYWEWYjQ/kKiT9WID01S2l7YdyvYcJTA3JVr+zA2h9zk+EwU at2g== X-Received: by 10.170.186.86 with SMTP id c83mr11073979yke.19.1428512077883; Wed, 08 Apr 2015 09:54:37 -0700 (PDT) Received: from localhost.localdomain ([177.194.99.89]) by mx.google.com with ESMTPSA id f2sm9443882yhg.17.2015.04.08.09.54.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Apr 2015 09:54:36 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 8 Apr 2015 13:54:22 -0300 Message-Id: <1428512062-17229-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: nicoleotsuka@gmail.com, Fabio Estevam , alsa-devel@alsa-project.org, lars@metafoo.de, timur@tabi.org Subject: [alsa-devel] [PATCH] ASoC: fsl_ssi: Remove custom fsl_ssi_debugfs_create/remove() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam Since commit 81c7cfd1b22a0 ("ASoC: Move debugfs registration to the component level") ASoC core code deals with registering debugfs, so we should remove the custom fsl_ssi_debugfs_create/remove() to avoid the following warning: fsl-ssi-dai 2028000.ssi: ASoC: Failed to create component debugfs directory Signed-off-by: Fabio Estevam --- sound/soc/fsl/fsl_ssi.c | 11 +---------- sound/soc/fsl/fsl_ssi.h | 13 ------------- sound/soc/fsl/fsl_ssi_dbg.c | 22 ---------------------- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 6b0c8f7..b8cdb8f 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1411,10 +1411,6 @@ static int fsl_ssi_probe(struct platform_device *pdev) } } - ret = fsl_ssi_debugfs_create(&ssi_private->dbg_stats, &pdev->dev); - if (ret) - goto error_irq; - /* * If codec-handle property is missing from SSI node, we assume * that the machine driver uses new binding which does not require @@ -1441,7 +1437,7 @@ static int fsl_ssi_probe(struct platform_device *pdev) if (IS_ERR(ssi_private->pdev)) { ret = PTR_ERR(ssi_private->pdev); dev_err(&pdev->dev, "failed to register platform: %d\n", ret); - goto error_sound_card; + goto error_irq; } done: @@ -1451,9 +1447,6 @@ done: return 0; -error_sound_card: - fsl_ssi_debugfs_remove(&ssi_private->dbg_stats); - error_irq: snd_soc_unregister_component(&pdev->dev); @@ -1468,8 +1461,6 @@ static int fsl_ssi_remove(struct platform_device *pdev) { struct fsl_ssi_private *ssi_private = dev_get_drvdata(&pdev->dev); - fsl_ssi_debugfs_remove(&ssi_private->dbg_stats); - if (ssi_private->pdev) platform_device_unregister(ssi_private->pdev); snd_soc_unregister_component(&pdev->dev); diff --git a/sound/soc/fsl/fsl_ssi.h b/sound/soc/fsl/fsl_ssi.h index 5065105..4767df1 100644 --- a/sound/soc/fsl/fsl_ssi.h +++ b/sound/soc/fsl/fsl_ssi.h @@ -241,10 +241,6 @@ struct fsl_ssi_dbg { void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *ssi_dbg, u32 sisr); -int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev); - -void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg); - #else struct fsl_ssi_dbg { @@ -254,15 +250,6 @@ static inline void fsl_ssi_dbg_isr(struct fsl_ssi_dbg *stats, u32 sisr) { } -static inline int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, - struct device *dev) -{ - return 0; -} - -static inline void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg) -{ -} #endif /* ! IS_ENABLED(CONFIG_DEBUG_FS) */ #endif diff --git a/sound/soc/fsl/fsl_ssi_dbg.c b/sound/soc/fsl/fsl_ssi_dbg.c index 5469ffb..118064c 100644 --- a/sound/soc/fsl/fsl_ssi_dbg.c +++ b/sound/soc/fsl/fsl_ssi_dbg.c @@ -139,25 +139,3 @@ static const struct file_operations fsl_ssi_stats_ops = { .llseek = seq_lseek, .release = single_release, }; - -int fsl_ssi_debugfs_create(struct fsl_ssi_dbg *ssi_dbg, struct device *dev) -{ - ssi_dbg->dbg_dir = debugfs_create_dir(dev_name(dev), NULL); - if (!ssi_dbg->dbg_dir) - return -ENOMEM; - - ssi_dbg->dbg_stats = debugfs_create_file("stats", S_IRUGO, - ssi_dbg->dbg_dir, ssi_dbg, &fsl_ssi_stats_ops); - if (!ssi_dbg->dbg_stats) { - debugfs_remove(ssi_dbg->dbg_dir); - return -ENOMEM; - } - - return 0; -} - -void fsl_ssi_debugfs_remove(struct fsl_ssi_dbg *ssi_dbg) -{ - debugfs_remove(ssi_dbg->dbg_stats); - debugfs_remove(ssi_dbg->dbg_dir); -}