• Vladimir Zapolskiy's avatar
    rtc: lpc32xx: remove irq > NR_IRQS check from probe() · 529af7d1
    Vladimir Zapolskiy authored
    If the driver is used on an ARM platform with SPARSE_IRQ defined,
    semantics of NR_IRQS is different (minimal value of virtual irqs)
    and by default it is set to 16, see arch/arm/include/asm/irq.h.
    
    This value may be less than the actual number of virtual irqs, which
    may break the driver initialization. The check removal allows to use
    the driver on such a platform, and, if irq controller driver works
    correctly, the check is not needed on legacy platforms.
    
    Fixes a runtime problem:
    
      rtc-lpc32xx 40024000.rtc: Can't get interrupt resource
    Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
    Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
    529af7d1
rtc-lpc32xx.c 9.65 KB