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 <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>
This commit is contained in:
parent
b6da197a2e
commit
5848ad2f1b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue