struct hda_codec *codec = tas_priv->codec;
int ret;
- pm_runtime_get_sync(tas_priv->dev);
- mutex_lock(&tas_priv->codec_lock);
+ guard(pm_runtime_active_auto)(tas_priv->dev);
+ guard(mutex)(&tas_priv->codec_lock);
ret = tasdevice_rca_parser(tas_priv, fmw);
if (ret)
}
out:
- mutex_unlock(&tas_hda->priv->codec_lock);
release_firmware(fmw);
- pm_runtime_put_autosuspend(tas_hda->dev);
}
static int tas2781_hda_bind(struct device *dev, struct device *master,
break;
}
- pm_runtime_get_sync(dev);
+ guard(pm_runtime_active_auto)(dev);
comp->dev = dev;
if (!ret)
comp->playback_hook = tas2781_hda_playback_hook;
- pm_runtime_put_autosuspend(dev);
-
return ret;
}
struct hda_codec *codec = tas_priv->codec;
int ret, val;
- pm_runtime_get_sync(tas_priv->dev);
+ guard(pm_runtime_active_auto)(tas_priv->dev);
guard(mutex)(&tas_priv->codec_lock);
ret = tasdevice_rca_parser(tas_priv, fmw);
tas2781_save_calibration(tas_hda);
out:
release_firmware(fmw);
- pm_runtime_put_autosuspend(tas_hda->priv->dev);
}
static int tas2781_hda_bind(struct device *dev, struct device *master,
codec = parent->codec;
- pm_runtime_get_sync(dev);
+ guard(pm_runtime_active_auto)(dev);
comp->dev = dev;
if (!ret)
comp->playback_hook = tas2781_hda_playback_hook;
- pm_runtime_put_autosuspend(dev);
-
return ret;
}