summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2017-01-06 10:35:16 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-01-22 00:23:20 -0800
commit62481881401246859d9bd06b7c7b9a391c78892c (patch)
tree8957f4ad51fabc3985f165cda6d60dda158d2a0b
parente9728f0dd7dc06fb0f0d18552ab9599005cd2ab7 (diff)
Input: pwm-beeper - suppress error message on probe defer
This suppress printing an error message when pwm_get returns -EPROBE_DEFER. Otherwise you get a bunch of noise in the kernel log. Signed-off-by: David Lechner <david@lechnology.com> Reviewed-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/misc/pwm-beeper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
index 9d7987d9ba1b..069d594554bd 100644
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -108,7 +108,9 @@ static int pwm_beeper_probe(struct platform_device *pdev)
beeper->pwm = devm_pwm_get(dev, NULL);
if (IS_ERR(beeper->pwm)) {
error = PTR_ERR(beeper->pwm);
- dev_err(dev, "Failed to request PWM device: %d\n", error);
+ if (error != -EPROBE_DEFER)
+ dev_err(dev, "Failed to request PWM device: %d\n",
+ error);
return error;
}