From: Andy Shevchenko Date: Thu, 23 Jan 2020 13:14:36 +0000 (+0200) Subject: rtc: cmos: Use predefined value for RTC IRQ on legacy x86 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5848ad2f1bcbb1bfbf3db3ee1a51fa5d0994ead6;p=linux.git rtc: cmos: Use predefined value for RTC IRQ on legacy x86 When legacy devices are present on x86 machine, the RTC IRQ has a dedicated pre-defined value. Use it instead of hard coded number. Cc: Hans de Goede Signed-off-by: Andy Shevchenko Tested-by: Guilherme G. Piccoli Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200123131437.28157-2-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index cb28bbdc9e17f..aee55b658f856 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c @@ -1305,7 +1305,7 @@ static int cmos_pnp_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) * hardcode it on systems with a legacy PIC. */ if (nr_legacy_irqs()) - irq = 8; + irq = RTC_IRQ; #endif return cmos_do_probe(&pnp->dev, pnp_get_resource(pnp, IORESOURCE_IO, 0), irq);