• L
    Fix RTC wakealarm sysfs interface breakage. · 1efd325f
    Linus Torvalds 提交于
    Commit ed458df4 ("PnP: move
    pnpacpi/pnpbios_init to after PCI init") moved the PnP RTC discovery
    later, and now the ACPI RTC glue code doesn't find it any more, breaking
    the RTC wakealarm sysfs interfaces, as reported by Rafael.
    
    This really is fairly messy, and we have several annoying ordering
    constraints here - the PnP code that sets up the RTC resources wants to
    run after the PCI resources have to be registered, which in turn needs
    to run after ACPI has at least enumerated the root PCI buses etc.  Our
    initcall ordering is not fine-grained enough to make this all painless.
    
    So this moves the ACPI RTC glue ("acpi_rtc_init()") down to a regular
    module call, which fixes the problem Rafael has.  The reason this isn't
    wonderful is that we really should do acpi_rtc_init before we do the
    rtc_cmos init, and now those two are in the same module_init() section.
    
    Which happens to work, but only because drivers/rtc is linked after
    drivers/acpi.  In other words, we still have a very subtle ordering
    issue here. Grr.
    Reported-and-tested-by: NRafael J. Wysocki <rjw@sisk.pl>
    Acked-by: NDavid Brownell <david-b@pacbell.net>
    Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
    1efd325f
glue.c 8.7 KB