|
@@ -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 */
|
|
@@ -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) {
|
|
@@ -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;
|
|
@@ -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);
|
|
@@ -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:
|