• Anders Roxell's avatar
    misc: pvpanic: fix warning implicit declaration · d8e346eb
    Anders Roxell authored
    When building and have fragment CONFIG_NO_IOPORT_MAP enabled then the
    following warning:
    
    ../drivers/misc/pvpanic.c: In function ‘pvpanic_walk_resources’:
    ../drivers/misc/pvpanic.c:73:10: error: implicit declaration of
     function ‘ioport_map’; did you mean ‘ioremap’?
     [-Werror=implicit-function-declaration]
       base = ioport_map(r.start, resource_size(&r));
              ^~~~~~~~~~
    
    Since commmit 5d32a665 ("PCI/ACPI: Allow ACPI to be built without
    CONFIG_PCI set"), its now possible to have ACPI enabled without haveing
    PCI enabled. However, the pvpanic driver depends on HAS_IOPORT_MAP or
    HAVE_IOREMAP_PROT when ACPI is enabled. It was fine until
    commit 725eba29 ("misc/pvpanic: add MMIO support") got added.
    Rework so that we do a extra check ifdef CONFIG_HAS_IOPORT_MAP.
    
    Fixes: 5d32a665 ("PCI/ACPI: Allow ACPI to be built without CONFIG_PCI set")
    Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d8e346eb
pvpanic.c 3.92 KB