mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
serial: sh-sci: Use platform_get_irq_optional() for optional interrupts
As platform_get_irq() now prints an error when the interrupt does not
exist, scary warnings may be printed for optional interrupts:
sh-sci e6550000.serial: IRQ index 1 not found
sh-sci e6550000.serial: IRQ index 2 not found
sh-sci e6550000.serial: IRQ index 3 not found
sh-sci e6550000.serial: IRQ index 4 not found
sh-sci e6550000.serial: IRQ index 5 not found
Fix this by calling platform_get_irq_optional() instead for all but the
first interrupts, which are optional.
Fixes: 7723f4c5ec ("driver core: platform: Add an error message to platform_get_irq*()")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Reviewed-by: Yoshihiro Shimoda <[email protected]>
Tested-by: Yoshihiro Shimoda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
fc5f3782da
commit
392fb8df52
1 changed files with 6 additions and 2 deletions
|
|
@ -2894,8 +2894,12 @@ static int sci_init_single(struct platform_device *dev,
|
|||
port->mapbase = res->start;
|
||||
sci_port->reg_size = resource_size(res);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i)
|
||||
sci_port->irqs[i] = platform_get_irq(dev, i);
|
||||
for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) {
|
||||
if (i)
|
||||
sci_port->irqs[i] = platform_get_irq_optional(dev, i);
|
||||
else
|
||||
sci_port->irqs[i] = platform_get_irq(dev, i);
|
||||
}
|
||||
|
||||
/* The SCI generates several interrupts. They can be muxed together or
|
||||
* connected to different interrupt lines. In the muxed case only one
|
||||
|
|
|
|||
Loading…
Reference in a new issue