Input: wm97xx - use EBUSY instead of EINVAL
Subsystems (3)
PATCH 1/1 Input: wm97xx - use EBUSY instead of EINVAL
If request_irq() fails, we have to return -EBUSY instead of -EINVAL.
--- drivers/input/touchscreen/wm97xx-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/input/touchscreen/wm97xx-core.c +1 -1
@@ -375,7 +375,7 @@ static int wm97xx_init_pen_irq(struct wm97xx *wm)dev_err (wm->dev,"Failed to register pen down interrupt, polling" ); wm->pen_irq =0 ; -return -EINVAL ; +return -EBUSY ; }/* Configure GPIO as interrupt source on WM971x */
Signature · 1 line
1.6.0.4
Quoted 1 line · Joonyoung Shim
If
request_irq()fails, we have to return-EBUSYinstead of-EINVAL.
Could you provide a bit more explanation for this one, please? -EBUSY seems to give entirely the wrong impression to applications since in the systems where this driver will be deployed a failure to acquire the IRQ is most likely to be due to incorrect platform data and it is highly unlikely to resolve itself.
Dmitry Torokhov
maintainerQuoted 8 lines · Mark Brown
Quoted 1 line · Joonyoung Shim
If
request_irq()fails, we have to return-EBUSYinstead of-EINVAL.Could you provide a bit more explanation for this one, please?
-EBUSYseems to give entirely the wrong impression to applications since in the systems where this driver will be deployed a failure to acquire the IRQ is most likely to be due to incorrect platform data and it is highly unlikely to resolve itself.
The "most correct" thing would be to propagate the value returned by request_irq() I think but since nobidy actually uses result of wm97xx_init_pen_irq() I just would not bother at all.
Signature · 1 line
Dmitry
Quoted 3 lines · Dmitry Torokhov
The "most correct" thing would be to propagate the value returned by
request_irq()I think but since nobidy actually uses result ofwm97xx_init_pen_irq()I just would not bother at all.
Yeah, I was looking at that - the driver can run in polling mode so it's fine as-is. I could change the code to return void, I suppose.
Dmitry Torokhov
maintainerQuoted 7 lines · On Wednesday 03 June 2009 07:40:24 Mark Brown wrote:
Quoted 3 lines · Dmitry Torokhov
The "most correct" thing would be to propagate the value returned by
request_irq()I think but since nobidy actually uses result ofwm97xx_init_pen_irq()I just would not bother at all.Yeah, I was looking at that - the driver can run in polling mode so it's fine as-is. I could change the code to return void, I suppose.
Yes, I think that would be the best.
Signature · 1 line
Dmitry
Quoted 8 lines · Mark Brown
Quoted 1 line · Joonyoung Shim
If
request_irq()fails, we have to return-EBUSYinstead of-EINVAL.Could you provide a bit more explanation for this one, please?
-EBUSYseems to give entirely the wrong impression to applications since in the systems where this driver will be deployed a failure to acquire the IRQ is most likely to be due to incorrect platform data and it is highly unlikely to resolve itself.
-EBUSY is used in many touchscreen drivers currently, but i agree dmitry opinion to propagate what request_irq() returned because request_irq() can return different errnos.
Thanks.