rtc: cmos: Use predefined value for RTC IRQ on legacy x86
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 23 Jan 2020 13:14:36 +0000 (15:14 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Sat, 25 Jan 2020 20:55:12 +0000 (21:55 +0100)
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 <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Guilherme G. Piccoli <gpiccoli@canonical.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200123131437.28157-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-cmos.c

index cb28bbdc9e17f48c2c4a38fbdbea4815128f8d30..aee55b658f856d5cb8690196c8f1e777a8e2c51f 100644 (file)
@@ -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);