ASoC: tegra: Use runtime PM get/put() on SFC device

SFC driver performs runtime PM operations on the parent device of SFC.
This is not necessary as runtime get/put() calls on the SFC device itself
would be sufficient. Because SFC device is child of AHUB device and
resuming child would resume parent device as well. This does not fix any
functional issue, but just makes code more easy to read.

Bug 200698314

Change-Id: Ia4ce4b45b8681d2db15af96f61433643dd4f3916
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
This commit is contained in:
Sameer Pujar
2021-03-19 20:45:44 +05:30
parent 9f635d7089
commit 99d23f60af

View File

@@ -3094,9 +3094,9 @@ static int tegra210_sfc_init(struct snd_soc_component *cmpnt, int init)
dev_dbg(cmpnt->dev, "%s: inrate %d outrate %d\n",
__func__, sfc->srate_in, sfc->srate_out);
err = pm_runtime_get_sync(cmpnt->dev->parent);
err = pm_runtime_get_sync(cmpnt->dev);
if (err < 0) {
dev_err(cmpnt->dev, "parent get_sync failed: %d\n", err);
dev_err(cmpnt->dev, "RPM get_sync() failed: %d\n", err);
return err;
}
@@ -3158,7 +3158,7 @@ static int tegra210_sfc_init(struct snd_soc_component *cmpnt, int init)
regmap_write(sfc->regmap, TEGRA210_SFC_ENABLE, 1);
}
exit:
pm_runtime_put(cmpnt->dev->parent);
pm_runtime_put(cmpnt->dev);
return err;
}