• Ohad Ben-Cohen's avatar
    mmc: fix runtime PM with -ENOSYS suspend case · ecc02441
    Ohad Ben-Cohen authored
    In the case where a driver returns -ENOSYS from its suspend handler
    to indicate that the device should be powered down over suspend, the
    remove routine of the driver was not being called, leading to lots of
    confusion during resume.
    
    The problem is that runtime PM is disabled during this process,
    and when we reach mmc_sdio_remove, calling the runtime PM functions here
    (validly) return errors, and this was causing us to skip the remove
    function.
    
    Fix this by ignoring the error value of pm_runtime_get_sync(), which
    can return valid errors. This also matches the behaviour of
    pci_device_remove().
    Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    ecc02441
sdio_bus.c 7.1 KB