Loading sound/pci/hda/hda_controller.c +2 −2 Original line number Diff line number Diff line Loading @@ -1681,7 +1681,7 @@ irqreturn_t azx_interrupt(int irq, void *dev_id) int i; #ifdef CONFIG_PM if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME) if (azx_has_pm_runtime(chip)) if (!pm_runtime_active(chip->card->dev)) return IRQ_NONE; #endif Loading Loading @@ -1784,7 +1784,7 @@ static void azx_power_notify(struct hda_bus *bus, bool power_up) { struct azx *chip = bus->private_data; if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!azx_has_pm_runtime(chip)) return; if (power_up) Loading sound/pci/hda/hda_intel.c +5 −7 Original line number Diff line number Diff line Loading @@ -852,7 +852,7 @@ static int azx_runtime_suspend(struct device *dev) if (chip->disabled || hda->init_failed) return 0; if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!azx_has_pm_runtime(chip)) return 0; /* enable controller wake up event */ Loading Loading @@ -885,7 +885,7 @@ static int azx_runtime_resume(struct device *dev) if (chip->disabled || hda->init_failed) return 0; if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!azx_has_pm_runtime(chip)) return 0; if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { Loading Loading @@ -928,8 +928,7 @@ static int azx_runtime_idle(struct device *dev) if (chip->disabled || hda->init_failed) return 0; if (!power_save_controller || !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!power_save_controller || !azx_has_pm_runtime(chip)) return -EBUSY; return 0; Loading Loading @@ -1071,8 +1070,7 @@ static int azx_free(struct azx *chip) struct hda_intel *hda = container_of(chip, struct hda_intel, chip); int i; if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) && chip->running) if (azx_has_pm_runtime(chip) && chip->running) pm_runtime_get_noresume(&pci->dev); azx_del_card_list(chip); Loading Loading @@ -1938,7 +1936,7 @@ static int azx_probe_continue(struct azx *chip) power_down_all_codecs(chip); azx_notifier_register(chip); azx_add_card_list(chip); if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || hda->use_vga_switcheroo) if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo) pm_runtime_put_noidle(&pci->dev); out_free: Loading sound/pci/hda/hda_priv.h +3 −0 Original line number Diff line number Diff line Loading @@ -403,4 +403,7 @@ struct azx { #define azx_sd_readb(chip, dev, reg) \ ((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg)) #define azx_has_pm_runtime(chip) \ (!AZX_DCAPS_PM_RUNTIME || ((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME)) #endif /* __SOUND_HDA_PRIV_H */ Loading
sound/pci/hda/hda_controller.c +2 −2 Original line number Diff line number Diff line Loading @@ -1681,7 +1681,7 @@ irqreturn_t azx_interrupt(int irq, void *dev_id) int i; #ifdef CONFIG_PM if (chip->driver_caps & AZX_DCAPS_PM_RUNTIME) if (azx_has_pm_runtime(chip)) if (!pm_runtime_active(chip->card->dev)) return IRQ_NONE; #endif Loading Loading @@ -1784,7 +1784,7 @@ static void azx_power_notify(struct hda_bus *bus, bool power_up) { struct azx *chip = bus->private_data; if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!azx_has_pm_runtime(chip)) return; if (power_up) Loading
sound/pci/hda/hda_intel.c +5 −7 Original line number Diff line number Diff line Loading @@ -852,7 +852,7 @@ static int azx_runtime_suspend(struct device *dev) if (chip->disabled || hda->init_failed) return 0; if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!azx_has_pm_runtime(chip)) return 0; /* enable controller wake up event */ Loading Loading @@ -885,7 +885,7 @@ static int azx_runtime_resume(struct device *dev) if (chip->disabled || hda->init_failed) return 0; if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!azx_has_pm_runtime(chip)) return 0; if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { Loading Loading @@ -928,8 +928,7 @@ static int azx_runtime_idle(struct device *dev) if (chip->disabled || hda->init_failed) return 0; if (!power_save_controller || !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME)) if (!power_save_controller || !azx_has_pm_runtime(chip)) return -EBUSY; return 0; Loading Loading @@ -1071,8 +1070,7 @@ static int azx_free(struct azx *chip) struct hda_intel *hda = container_of(chip, struct hda_intel, chip); int i; if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) && chip->running) if (azx_has_pm_runtime(chip) && chip->running) pm_runtime_get_noresume(&pci->dev); azx_del_card_list(chip); Loading Loading @@ -1938,7 +1936,7 @@ static int azx_probe_continue(struct azx *chip) power_down_all_codecs(chip); azx_notifier_register(chip); azx_add_card_list(chip); if ((chip->driver_caps & AZX_DCAPS_PM_RUNTIME) || hda->use_vga_switcheroo) if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo) pm_runtime_put_noidle(&pci->dev); out_free: Loading
sound/pci/hda/hda_priv.h +3 −0 Original line number Diff line number Diff line Loading @@ -403,4 +403,7 @@ struct azx { #define azx_sd_readb(chip, dev, reg) \ ((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg)) #define azx_has_pm_runtime(chip) \ (!AZX_DCAPS_PM_RUNTIME || ((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME)) #endif /* __SOUND_HDA_PRIV_H */