Skip to content
Commit ab6ead7d authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Tony Lindgren
Browse files

ARM: OMAP1: ams-delta: Fix impossible .irq < 0

Since the very beginning, unsigned int .irq member of struct
plat_serial8250_port introduced by commit eff443df ("OMAP1:
AMS_DELTA: add modem support") was statically initialized to a negative
value -EINVAL.  Moreover, commit 0812db94 ("ARM: OMAP1: ams-delta:
assign MODEM IRQ from GPIO descriptor") has introduced some new code
which checks for that member carrying a negative value which is
impossible.

Use IRQ_NOTCONNECTED instead of -EINVAL. Also, drop the valueless check
and let the modem device be registered regardless of .irq value, and
the value handled by "serial8250" driver.

Fixes: 0812db94

 ("ARM: OMAP1: ams-delta: assign MODEM IRQ from GPIO descriptor")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 1137ceee
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