From: Ladislav Michl <ladis@linux-mips.org>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH v2] ASoC: max9867: Improve error logging
Date: Thu, 1 Mar 2018 23:03:57 +0100 [thread overview]
Message-ID: <20180301220357.GA6104@lenoch> (raw)
Tell user what are clock rate limits and reindent log messages.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
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,
--
2.16.2
reply other threads:[~2018-03-01 22:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180301220357.GA6104@lenoch \
--to=ladis@linux-mips.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.