serial: xilinx: Use platform_get_irq to get irq description structure
authorMichal Simek <michal.simek@xilinx.com>
Mon, 13 Apr 2015 14:34:21 +0000 (16:34 +0200)
committerZefan Li <lizefan@huawei.com>
Fri, 18 Sep 2015 01:20:34 +0000 (09:20 +0800)
commit9aabcbc013b7bf3d519ab703456ee1869eac198c
tree2026e9fb45e9a58195d85f11b41b9bc2b1bc32af
parentc2f1b991709c18f31fa3c1c948ac73bd56f4882a
serial: xilinx: Use platform_get_irq to get irq description structure

commit 5c90c07b98c02198d9777a7c4f3047b0a94bf7ed upstream.

For systems with CONFIG_SERIAL_OF_PLATFORM=y and device_type =
"serial"; property in DT of_serial.c driver maps and unmaps IRQ (because
driver probe fails). Then a driver is called but irq mapping is not
created that's why driver is failing again in again on request_irq().
Based on this use platform_get_irq() instead of platform_get_resource()
which is doing irq_desc allocation and driver itself can request IRQ.

Fix both xilinx serial drivers in the tree.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/tty/serial/uartlite.c
drivers/tty/serial/xilinx_uartps.c