* [PATCH] serial: 8250-mtk: Use platform_get_irq_optional() for optional irq
@ 2019-10-27 6:21 Frank Wunderlich
2019-11-10 20:23 ` Matthias Brugger
0 siblings, 1 reply; 2+ messages in thread
From: Frank Wunderlich @ 2019-10-27 6:21 UTC (permalink / raw)
To: linux-mediatek
Cc: Frank Wunderlich, Greg Kroah-Hartman, Matthias Brugger,
linux-serial, linux-arm-kernel, linux-kernel
As platform_get_irq() now prints an error when the interrupt does not
exist, this warnings are printed on bananapi-r2:
[ 4.935780] mt6577-uart 11004000.serial: IRQ index 1 not found
[ 4.962589] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 202, base_baud = 1625000) is a ST16650V2
[ 4.972127] mt6577-uart 11002000.serial: IRQ index 1 not found
[ 4.998927] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 203, base_baud = 1625000) is a ST16650V2
[ 5.008474] mt6577-uart 11003000.serial: IRQ index 1 not found
Fix this by calling platform_get_irq_optional() instead.
now it looks like this:
[ 4.872751] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
changes since v1:
https://patchwork.kernel.org/patch/11213813/
change from platform_irq_count to platform_get_irq_optional
---
drivers/tty/serial/8250/8250_mtk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
index b411ba4eb5e9..4d067f515f74 100644
--- a/drivers/tty/serial/8250/8250_mtk.c
+++ b/drivers/tty/serial/8250/8250_mtk.c
@@ -544,7 +544,7 @@ static int mtk8250_probe(struct platform_device *pdev)
pm_runtime_set_active(&pdev->dev);
pm_runtime_enable(&pdev->dev);
- data->rx_wakeup_irq = platform_get_irq(pdev, 1);
+ data->rx_wakeup_irq = platform_get_irq_optional(pdev, 1);
return 0;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] serial: 8250-mtk: Use platform_get_irq_optional() for optional irq
2019-10-27 6:21 [PATCH] serial: 8250-mtk: Use platform_get_irq_optional() for optional irq Frank Wunderlich
@ 2019-11-10 20:23 ` Matthias Brugger
0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2019-11-10 20:23 UTC (permalink / raw)
To: Frank Wunderlich, linux-mediatek
Cc: Greg Kroah-Hartman, linux-serial, linux-arm-kernel, linux-kernel
On 27/10/2019 07:21, Frank Wunderlich wrote:
> As platform_get_irq() now prints an error when the interrupt does not
> exist, this warnings are printed on bananapi-r2:
>
> [ 4.935780] mt6577-uart 11004000.serial: IRQ index 1 not found
> [ 4.962589] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 202, base_baud = 1625000) is a ST16650V2
> [ 4.972127] mt6577-uart 11002000.serial: IRQ index 1 not found
> [ 4.998927] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 203, base_baud = 1625000) is a ST16650V2
> [ 5.008474] mt6577-uart 11003000.serial: IRQ index 1 not found
>
> Fix this by calling platform_get_irq_optional() instead.
>
> now it looks like this:
>
> [ 4.872751] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
>
> Fixes: 7723f4c5ecdb8d83 ("driver core: platform: Add an error message to platform_get_irq*()")
>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
> ---
> changes since v1:
> https://patchwork.kernel.org/patch/11213813/
> change from platform_irq_count to platform_get_irq_optional
> ---
> drivers/tty/serial/8250/8250_mtk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c
> index b411ba4eb5e9..4d067f515f74 100644
> --- a/drivers/tty/serial/8250/8250_mtk.c
> +++ b/drivers/tty/serial/8250/8250_mtk.c
> @@ -544,7 +544,7 @@ static int mtk8250_probe(struct platform_device *pdev)
> pm_runtime_set_active(&pdev->dev);
> pm_runtime_enable(&pdev->dev);
>
> - data->rx_wakeup_irq = platform_get_irq(pdev, 1);
> + data->rx_wakeup_irq = platform_get_irq_optional(pdev, 1);
>
> return 0;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-10 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 6:21 [PATCH] serial: 8250-mtk: Use platform_get_irq_optional() for optional irq Frank Wunderlich
2019-11-10 20:23 ` Matthias Brugger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).