Skip to content

Commit 4d690e5

Browse files
AngeloGioacchino Del Regnothierryreding
authored andcommitted
pwm: pwm-mediatek: Beautify error messages text
As a cherry-on-top cleanup, make error messages clearer to read by changing instances of "clock: XXXX failed" to a more readable "Failed to get XXXX clock". Also add "of" to unsupported period error. This is purely a cosmetic change; no "real" functional changes. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
1 parent 446925f commit 4d690e5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/pwm/pwm-mediatek.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
146146

147147
if (clkdiv > PWM_CLK_DIV_MAX) {
148148
pwm_mediatek_clk_disable(chip, pwm);
149-
dev_err(chip->dev, "period %d not supported\n", period_ns);
149+
dev_err(chip->dev, "period of %d ns not supported\n", period_ns);
150150
return -EINVAL;
151151
}
152152

@@ -229,12 +229,12 @@ static int pwm_mediatek_probe(struct platform_device *pdev)
229229
pc->clk_top = devm_clk_get(&pdev->dev, "top");
230230
if (IS_ERR(pc->clk_top))
231231
return dev_err_probe(&pdev->dev, PTR_ERR(pc->clk_top),
232-
"clock: top failed\n");
232+
"Failed to get top clock\n");
233233

234234
pc->clk_main = devm_clk_get(&pdev->dev, "main");
235235
if (IS_ERR(pc->clk_main))
236236
return dev_err_probe(&pdev->dev, PTR_ERR(pc->clk_main),
237-
"clock: main failed\n");
237+
"Failed to get main clock\n");
238238

239239
for (i = 0; i < pc->soc->num_pwms; i++) {
240240
char name[8];
@@ -244,7 +244,7 @@ static int pwm_mediatek_probe(struct platform_device *pdev)
244244
pc->clk_pwms[i] = devm_clk_get(&pdev->dev, name);
245245
if (IS_ERR(pc->clk_pwms[i]))
246246
return dev_err_probe(&pdev->dev, PTR_ERR(pc->clk_pwms[i]),
247-
"clock: %s failed\n", name);
247+
"Failed to get %s clock\n", name);
248248
}
249249

250250
pc->chip.dev = &pdev->dev;

0 commit comments

Comments
 (0)