mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
ASoC: tegra-alt: avoid address hardcoding
xbar codec is registered as per the physical address and the same is used while defining the dai links. This results in unnecessary duplication of the code and this is not scalable for upcoming platforms too. This patch removes such hardcodings for xbar and adsp audio driver by using dev_set_name() api. Bug 200346429 Change-Id: I16147b94cc1686ceb8b084ead91d2d35b1f0fbbd Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1568711 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -4871,6 +4871,11 @@ static int tegra210_adsp_audio_platform_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
pr_info("tegra210_adsp_audio_platform_probe: platform probe started\n");
|
pr_info("tegra210_adsp_audio_platform_probe: platform probe started\n");
|
||||||
|
|
||||||
|
if (dev_set_name(&pdev->dev, "%s", DRV_NAME_ADSP) < 0) {
|
||||||
|
dev_err(&pdev->dev, "error in setting adsp device name\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
match = of_match_device(tegra210_adsp_audio_of_match, &pdev->dev);
|
match = of_match_device(tegra210_adsp_audio_of_match, &pdev->dev);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
dev_err(&pdev->dev, "Error: No device match found\n");
|
dev_err(&pdev->dev, "Error: No device match found\n");
|
||||||
|
|||||||
@@ -1515,6 +1515,13 @@ static int tegra_dev_xbar_probe(struct platform_device *pdev)
|
|||||||
struct tegra_xbar_soc_data *soc_data;
|
struct tegra_xbar_soc_data *soc_data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
/* required to register the xbar codec with generic name */
|
||||||
|
if (dev_set_name(&pdev->dev, "%s", DRV_NAME) < 0) {
|
||||||
|
dev_err(&pdev->dev, "error in setting xbar device name\n");
|
||||||
|
ret = -ENODEV;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
match = of_match_device(tegra_xbar_of_match, &pdev->dev);
|
match = of_match_device(tegra_xbar_of_match, &pdev->dev);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
dev_err(&pdev->dev, "Error: No device match found\n");
|
dev_err(&pdev->dev, "Error: No device match found\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user