From patchwork Thu Mar 1 22:03:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 10252659 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 E232D604D4 for ; Thu, 1 Mar 2018 22:04:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFD9428658 for ; Thu, 1 Mar 2018 22:04:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C43C828678; Thu, 1 Mar 2018 22:04: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, UNPARSEABLE_RELAY 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 35F922865F for ; Thu, 1 Mar 2018 22:04:08 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5C236267C6F; Thu, 1 Mar 2018 23:04:07 +0100 (CET) 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 CDF40267C70; Thu, 1 Mar 2018 23:04:05 +0100 (CET) Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by alsa0.perex.cz (Postfix) with ESMTP id 8A56A267C6E for ; Thu, 1 Mar 2018 23:04:03 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23992615AbeCAWEDBN6Zk (ORCPT ); Thu, 1 Mar 2018 23:04:03 +0100 Date: Thu, 1 Mar 2018 23:03:57 +0100 From: Ladislav Michl To: Mark Brown Message-ID: <20180301220357.GA6104@lenoch> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) Cc: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH v2] ASoC: max9867: Improve error logging 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Tell user what are clock rate limits and reindent log messages. Signed-off-by: Ladislav Michl --- Changes: - v2: Rebase against current branch sound/soc/codecs/max9867.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index 6b128dd6c5dd..b2a613e54fc7 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -291,7 +291,9 @@ static int max9867_set_dai_sysclk(struct snd_soc_dai *codec_dai, value |= MAX9867_PSCLK_40_60; max9867->pclk = freq/4; } else { - pr_err("bad clock frequency %d", freq); + dev_err(codec->dev, + "Invalid clock frequency %uHz (required 10-60MHz)\n", + freq); return -EINVAL; } value = value << MAX9867_PSCLK_SHIFT; @@ -476,8 +478,7 @@ static int max9867_i2c_probe(struct i2c_client *i2c, max9867->regmap = devm_regmap_init_i2c(i2c, &max9867_regmap); if (IS_ERR(max9867->regmap)) { ret = PTR_ERR(max9867->regmap); - dev_err(&i2c->dev, - "Failed to allocate regmap: %d\n", ret); + dev_err(&i2c->dev, "Failed to allocate regmap: %d\n", ret); return ret; } ret = regmap_read(max9867->regmap,