Skip to contentSkip to conversation

ASoC: max9867: Improve error logging

PATCH New Ladislav Michl 1 participant 1 message Mar 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ASoC: max9867: Improve error logging

Tell user what are clock rate limits and reindent log messages.

---
Changes:
- v2: Rebase against current branch

 sound/soc/codecs/max9867.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/codecs/max9867.c +4 -3
index 6b128dd6c5dd..b2a613e54fc7 100644
@@ -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,
Signature · 1 line
2.16.2