diff mbox

[TRIVIAL] PM / wakeup: only recommend "call"ing device_init_wakeup() once

Message ID 20171218233048.156954-1-briannorris@chromium.org (mailing list archive)
State Mainlined
Delegated to: Rafael Wysocki
Headers show

Commit Message

Brian Norris Dec. 18, 2017, 11:30 p.m. UTC
I'll admit admit it: I've written bad driver code that tries to
configure a device's wake IRQ without having called device_init_wakeup()
first. But do you really have to ask ask me twice?

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 drivers/base/power/wakeup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Dec. 19, 2017, 10:45 a.m. UTC | #1
On Tuesday, December 19, 2017 12:30:48 AM CET Brian Norris wrote:
> I'll admit admit it: I've written bad driver code that tries to
> configure a device's wake IRQ without having called device_init_wakeup()
> first. But do you really have to ask ask me twice?
> 
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
>  drivers/base/power/wakeup.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
> index 38559f04db2c..cb72965b3281 100644
> --- a/drivers/base/power/wakeup.c
> +++ b/drivers/base/power/wakeup.c
> @@ -298,7 +298,7 @@ int device_wakeup_attach_irq(struct device *dev,
>  
>  	ws = dev->power.wakeup;
>  	if (!ws) {
> -		dev_err(dev, "forgot to call call device_init_wakeup?\n");
> +		dev_err(dev, "forgot to call device_init_wakeup?\n");
>  		return -EINVAL;
>  	}
>  
> 

Applied, thanks!
diff mbox

Patch

diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 38559f04db2c..cb72965b3281 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -298,7 +298,7 @@  int device_wakeup_attach_irq(struct device *dev,
 
 	ws = dev->power.wakeup;
 	if (!ws) {
-		dev_err(dev, "forgot to call call device_init_wakeup?\n");
+		dev_err(dev, "forgot to call device_init_wakeup?\n");
 		return -EINVAL;
 	}