aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5682.c
diff options
context:
space:
mode:
authorGravatar Tzung-Bi Shih <tzungbi@google.com> 2020-04-30 16:22:29 +0800
committerGravatar Mark Brown <broonie@kernel.org> 2020-04-30 14:06:51 +0100
commit9c1cb755b5b325c18551f7d08438ea6896130acd (patch)
tree4d972bae78a11ed4d8c22254703d00b615652c54 /sound/soc/codecs/rt5682.c
parentASoC: rt5682: remove empty default case (diff)
downloadlinux-9c1cb755b5b325c18551f7d08438ea6896130acd.tar.gz
linux-9c1cb755b5b325c18551f7d08438ea6896130acd.tar.bz2
linux-9c1cb755b5b325c18551f7d08438ea6896130acd.zip
ASoC: rt5682: replace message printing from pr_() to dev_()
Replaces message printing from pr_() to dev_(). Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200430082231.151127-5-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5682.c')
-rw-r--r--sound/soc/codecs/rt5682.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c
index d38b2e8a7f43..bfe542dcc7ba 100644
--- a/sound/soc/codecs/rt5682.c
+++ b/sound/soc/codecs/rt5682.c
@@ -857,7 +857,7 @@ static int rt5682_button_detect(struct snd_soc_component *component)
val = snd_soc_component_read32(component, RT5682_4BTN_IL_CMD_1);
btn_type = val & 0xfff0;
snd_soc_component_write(component, RT5682_4BTN_IL_CMD_1, val);
- pr_debug("%s btn_type=%x\n", __func__, btn_type);
+ dev_dbg(component->dev, "%s btn_type=%x\n", __func__, btn_type);
snd_soc_component_update_bits(component,
RT5682_SAR_IL_CMD_2, 0x10, 0x10);
@@ -1189,7 +1189,8 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682,
int i;
if (rt5682->sysclk < target) {
- pr_err("sysclk rate %d is too low\n", rt5682->sysclk);
+ dev_err(rt5682->component->dev,
+ "sysclk rate %d is too low\n", rt5682->sysclk);
return 0;
}
@@ -1206,7 +1207,8 @@ static int rt5682_div_sel(struct rt5682_priv *rt5682,
}
if (target * div[i] < rt5682->sysclk)
- pr_err("sysclk rate %d is too high\n", rt5682->sysclk);
+ dev_err(rt5682->component->dev,
+ "sysclk rate %d is too high\n", rt5682->sysclk);
return size - 1;
}
@@ -3272,7 +3274,7 @@ static void rt5682_calibrate(struct rt5682_priv *rt5682)
}
if (count >= 60)
- pr_err("HP Calibration Failure\n");
+ dev_err(rt5682->component->dev, "HP Calibration Failure\n");
/* restore settings */
regmap_write(rt5682->regmap, RT5682_PWR_ANLG_1, 0x02af);
@@ -3391,7 +3393,7 @@ int rt5682_io_init(struct device *dev, struct sdw_slave *slave)
regmap_read(rt5682->regmap, RT5682_DEVICE_ID, &val);
if (val != DEVICE_ID) {
- pr_err("Device with ID register %x is not rt5682\n", val);
+ dev_err(dev, "Device with ID register %x is not rt5682\n", val);
return -ENODEV;
}
@@ -3562,7 +3564,8 @@ static int rt5682_i2c_probe(struct i2c_client *i2c,
regmap_read(rt5682->regmap, RT5682_DEVICE_ID, &val);
if (val != DEVICE_ID) {
- pr_err("Device with ID register %x is not rt5682\n", val);
+ dev_err(&i2c->dev,
+ "Device with ID register %x is not rt5682\n", val);
return -ENODEV;
}