From patchwork Fri Oct 7 07:59:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 9365733 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 67811600C8 for ; Fri, 7 Oct 2016 08:07:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56DB129387 for ; Fri, 7 Oct 2016 08:07:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B51F2938B; Fri, 7 Oct 2016 08:07:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D25B829387 for ; Fri, 7 Oct 2016 08:07:07 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BDA84266D22; Fri, 7 Oct 2016 10:07:05 +0200 (CEST) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 53004266D04; Fri, 7 Oct 2016 10:04:49 +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 85020266DFD; Fri, 7 Oct 2016 10:01:59 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by alsa0.perex.cz (Postfix) with ESMTP id 4DF64266AD7 for ; Fri, 7 Oct 2016 10:01:56 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 07 Oct 2016 01:01:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,308,1473145200"; d="scan'208";a="769891834" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.53]) by FMSMGA003.fm.intel.com with ESMTP; 07 Oct 2016 01:01:54 -0700 From: Jarkko Nikula To: alsa-devel@alsa-project.org Date: Fri, 7 Oct 2016 10:59:51 +0300 Message-Id: <20161007075951.20386-1-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.9.3 Cc: Oder Chiou , Mark Brown , Jarkko Nikula , Liam Girdwood Subject: [alsa-devel] [PATCH v2] ASoC: rl6347a: Use dev_err for I2C communication error prints 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 It's difficult to guess from bunch of "ret=-121" errors what driver and device actually caused them. Since struct i2c_client has the dev pointer use that for dev_err() with meaningful error message. Signed-off-by: Jarkko Nikula --- sound/soc/codecs/rl6347a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/rl6347a.c b/sound/soc/codecs/rl6347a.c index a4b910efbd45..8f571cf8edd4 100644 --- a/sound/soc/codecs/rl6347a.c +++ b/sound/soc/codecs/rl6347a.c @@ -51,7 +51,7 @@ int rl6347a_hw_write(void *context, unsigned int reg, unsigned int value) if (ret == 4) return 0; else - pr_err("ret=%d\n", ret); + dev_err(&client->dev, "I2C error %d\n", ret); if (ret < 0) return ret; else