Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1552481 > unrolled thread
| Started by | David Lechner <david@lechnology.com> |
|---|---|
| First post | 2017-01-06 03:50 +0100 |
| Last post | 2017-01-06 03:50 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/3] Input: pwm-beeper: suppress error message on probe defer David Lechner <david@lechnology.com> - 2017-01-06 03:50 +0100
| From | David Lechner <david@lechnology.com> |
|---|---|
| Date | 2017-01-06 03:50 +0100 |
| Subject | [PATCH 1/3] Input: pwm-beeper: suppress error message on probe defer |
| Message-ID | <sWsLn-3qX-15@gated-at.bofh.it> |
This suppress printing an error message when pwm_get/pwm_request returns
-EPROBE_DEFER. Otherwise you get a bunch of noise in the kernel log.
Signed-off-by: David Lechner <david@lechnology.com>
---
drivers/input/misc/pwm-beeper.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c
index 5f9655d..e76b710 100644
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -109,9 +109,10 @@ static int pwm_beeper_probe(struct platform_device *pdev)
beeper->pwm = pwm_request(pwm_id, "pwm beeper");
}
- if (IS_ERR(beeper->pwm)) {
- error = PTR_ERR(beeper->pwm);
- dev_err(&pdev->dev, "Failed to request pwm device: %d\n", error);
+ error = PTR_ERR_OR_ZERO(beeper->pwm);
+ if (error) {
+ if (error != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "Failed to request pwm device\n");
goto err_free;
}
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web