From patchwork Sun Jul 12 15:14:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatol Pomozov X-Patchwork-Id: 6772771 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 36CAF9F2F0 for ; Sun, 12 Jul 2015 15:16:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 713CC20632 for ; Sun, 12 Jul 2015 15:16:08 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 2D0CA205F4 for ; Sun, 12 Jul 2015 15:16:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3DADB2606A8; Sun, 12 Jul 2015 17:16:06 +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 07EBA2605F4; Sun, 12 Jul 2015 17:15:18 +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 6DDF02612AD; Sun, 12 Jul 2015 17:15:17 +0200 (CEST) Received: from mail-pd0-f181.google.com (mail-pd0-f181.google.com [209.85.192.181]) by alsa0.perex.cz (Postfix) with ESMTP id 0E0BC2605C7 for ; Sun, 12 Jul 2015 17:14:47 +0200 (CEST) Received: by pdjr16 with SMTP id r16so48469483pdj.3 for ; Sun, 12 Jul 2015 08:14:45 -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:in-reply-to:references; bh=fbvic7HpZOL4VNfzAjlC3MZ87koEneqkR3sP5Y4FS4Y=; b=MhABBJgTz8Gi6svGBhyK08lksN/vzwigHzaWPgYWl0CfB4n+Kc+oife9Mmakom+cbu 83vMRM7lU3I/YmSRIHINI49NnHeuGHs9Lt5rIJUA7Bpm+VNtUvlNNUbct1KuU+YXWMeM Q0evtvDaOw+Dii1eKurf7sHwx0FT4RBCtcX7WQKEpwNM7hgoxIRSjsUR/qVlqyfhUlH4 UsTXYqbctNCvriNv04iE4WLOlcsMXfX5ipGirKwy42fR4QL2V/c7I0Wn/ttb4bPClSko 7Kfi+wVCThaZbn0KcMak2Q70apTt/qkI52XkcPXP5FucB+utvatdV913fgypGwnIR6wk /qEQ== X-Received: by 10.70.125.129 with SMTP id mq1mr61722453pdb.19.1436714085753; Sun, 12 Jul 2015 08:14:45 -0700 (PDT) Received: from argo.lan (76-198-28-160.lightspeed.sntcca.sbcglobal.net. [76.198.28.160]) by smtp.gmail.com with ESMTPSA id c6sm15956838pas.39.2015.07.12.08.14.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Jul 2015 08:14:45 -0700 (PDT) From: Anatol Pomozov To: alsa-devel@alsa-project.org Date: Sun, 12 Jul 2015 08:14:21 -0700 Message-Id: <1436714061-18618-3-git-send-email-anatol.pomozov@gmail.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1436714061-18618-1-git-send-email-anatol.pomozov@gmail.com> References: <1436714061-18618-1-git-send-email-anatol.pomozov@gmail.com> Cc: broonie@kernel.org, lars@metafoo.de, kwestfie@codeaurora.org, Anatol Pomozov Subject: [alsa-devel] [PATCH 3/3] ASoC: max98357a: Do not print error message on asoc/gpio errors 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 gpiolib/asoc system already prints enough info if there are any problems. Signed-off-by: Anatol Pomozov --- sound/soc/codecs/max98357a.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c index b9e1131..e88119a 100644 --- a/sound/soc/codecs/max98357a.c +++ b/sound/soc/codecs/max98357a.c @@ -63,11 +63,9 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec) struct gpio_desc *sdmode; sdmode = devm_gpiod_get_optional(codec->dev, "sdmode", GPIOD_OUT_LOW); - if (IS_ERR(sdmode)) { - dev_err(codec->dev, "%s() unable to get sdmode GPIO: %ld\n", - __func__, PTR_ERR(sdmode)); + if (IS_ERR(sdmode)) return PTR_ERR(sdmode); - } + snd_soc_codec_set_drvdata(codec, sdmode); return 0; @@ -106,15 +104,8 @@ static struct snd_soc_dai_driver max98357a_dai_driver = { static int max98357a_platform_probe(struct platform_device *pdev) { - int ret; - - ret = snd_soc_register_codec(&pdev->dev, &max98357a_codec_driver, + return snd_soc_register_codec(&pdev->dev, &max98357a_codec_driver, &max98357a_dai_driver, 1); - if (ret) - dev_err(&pdev->dev, "%s() error registering codec driver: %d\n", - __func__, ret); - - return ret; } static int max98357a_platform_remove(struct platform_device *pdev)