• Rafael J. Wysocki's avatar
    PCI: PM: Do not use pci_platform_pm_ops for Intel MID PM · d5b0d883
    Rafael J. Wysocki authored
    There are only two users of struct pci_platform_pm_ops in the tree,
    one of which is Intel MID PM and the other one is ACPI.  They are
    mutually exclusive and the MID PM should take precedence when they
    both are enabled, but whether or not this really is the case hinges
    on the specific ordering of arch_initcall() calls made by them.
    
    The struct pci_platform_pm_ops abstraction is not really necessary
    for just these two users, but it adds complexity and overhead because
    of retoplines involved in using all of the function pointers in there.
    It also makes following the code a bit more difficult than it would
    be otherwise.
    
    Moreover, Intel MID PCI PM doesn't even implement the majority of the
    function pointers in struct pci_platform_pm_ops in a meaningful way,
    so switch over the PCI core to calling the relevant MID PM routines,
    mid_pci_set_power_state() and mid_pci_set_power_state(), directly as
    needed and drop mid_pci_platform_pm.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Tested-by: default avatarFerry Toth <fntoth@gmail.com>
    d5b0d883
pci-mid.c 1.1 KB