Commit 29ebf697 authored by Luca Weiss's avatar Luca Weiss Committed by Dmitry Torokhov

Input: pwm-vibra - add newline to dev_err prints

Make sure all printed messages end with a newline.
Signed-off-by: default avatarLuca Weiss <luca@z3ntu.xyz>
Reviewed-by: default avatarCaleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: default avatarBrian Masney <bmasney@redhat.com>
Reviewed-by: default avatarSebastian Reichel <sre@kernel.org>
Link: https://lore.kernel.org/r/20230427-hammerhead-vibra-v1-2-e87eeb94da51@z3ntu.xyzSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 54e66334
...@@ -42,7 +42,7 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator) ...@@ -42,7 +42,7 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator)
if (!vibrator->vcc_on) { if (!vibrator->vcc_on) {
err = regulator_enable(vibrator->vcc); err = regulator_enable(vibrator->vcc);
if (err) { if (err) {
dev_err(pdev, "failed to enable regulator: %d", err); dev_err(pdev, "failed to enable regulator: %d\n", err);
return err; return err;
} }
vibrator->vcc_on = true; vibrator->vcc_on = true;
...@@ -54,7 +54,7 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator) ...@@ -54,7 +54,7 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator)
err = pwm_apply_state(vibrator->pwm, &state); err = pwm_apply_state(vibrator->pwm, &state);
if (err) { if (err) {
dev_err(pdev, "failed to apply pwm state: %d", err); dev_err(pdev, "failed to apply pwm state: %d\n", err);
return err; return err;
} }
...@@ -65,7 +65,7 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator) ...@@ -65,7 +65,7 @@ static int pwm_vibrator_start(struct pwm_vibrator *vibrator)
err = pwm_apply_state(vibrator->pwm_dir, &state); err = pwm_apply_state(vibrator->pwm_dir, &state);
if (err) { if (err) {
dev_err(pdev, "failed to apply dir-pwm state: %d", err); dev_err(pdev, "failed to apply dir-pwm state: %d\n", err);
pwm_disable(vibrator->pwm); pwm_disable(vibrator->pwm);
return err; return err;
} }
...@@ -137,7 +137,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev) ...@@ -137,7 +137,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
err = PTR_ERR_OR_ZERO(vibrator->vcc); err = PTR_ERR_OR_ZERO(vibrator->vcc);
if (err) { if (err) {
if (err != -EPROBE_DEFER) if (err != -EPROBE_DEFER)
dev_err(&pdev->dev, "Failed to request regulator: %d", dev_err(&pdev->dev, "Failed to request regulator: %d\n",
err); err);
return err; return err;
} }
...@@ -146,7 +146,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev) ...@@ -146,7 +146,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
err = PTR_ERR_OR_ZERO(vibrator->pwm); err = PTR_ERR_OR_ZERO(vibrator->pwm);
if (err) { if (err) {
if (err != -EPROBE_DEFER) if (err != -EPROBE_DEFER)
dev_err(&pdev->dev, "Failed to request main pwm: %d", dev_err(&pdev->dev, "Failed to request main pwm: %d\n",
err); err);
return err; return err;
} }
...@@ -158,7 +158,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev) ...@@ -158,7 +158,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
state.enabled = false; state.enabled = false;
err = pwm_apply_state(vibrator->pwm, &state); err = pwm_apply_state(vibrator->pwm, &state);
if (err) { if (err) {
dev_err(&pdev->dev, "failed to apply initial PWM state: %d", dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
err); err);
return err; return err;
} }
...@@ -172,7 +172,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev) ...@@ -172,7 +172,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
state.enabled = false; state.enabled = false;
err = pwm_apply_state(vibrator->pwm_dir, &state); err = pwm_apply_state(vibrator->pwm_dir, &state);
if (err) { if (err) {
dev_err(&pdev->dev, "failed to apply initial PWM state: %d", dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
err); err);
return err; return err;
} }
...@@ -189,7 +189,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev) ...@@ -189,7 +189,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
break; break;
default: default:
dev_err(&pdev->dev, "Failed to request direction pwm: %d", err); dev_err(&pdev->dev, "Failed to request direction pwm: %d\n", err);
fallthrough; fallthrough;
case -EPROBE_DEFER: case -EPROBE_DEFER:
...@@ -207,13 +207,13 @@ static int pwm_vibrator_probe(struct platform_device *pdev) ...@@ -207,13 +207,13 @@ static int pwm_vibrator_probe(struct platform_device *pdev)
err = input_ff_create_memless(vibrator->input, NULL, err = input_ff_create_memless(vibrator->input, NULL,
pwm_vibrator_play_effect); pwm_vibrator_play_effect);
if (err) { if (err) {
dev_err(&pdev->dev, "Couldn't create FF dev: %d", err); dev_err(&pdev->dev, "Couldn't create FF dev: %d\n", err);
return err; return err;
} }
err = input_register_device(vibrator->input); err = input_register_device(vibrator->input);
if (err) { if (err) {
dev_err(&pdev->dev, "Couldn't register input dev: %d", err); dev_err(&pdev->dev, "Couldn't register input dev: %d\n", err);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment