mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
misc: tegra-cec: add /sys/devices/platform symlink
Create a symlink for tegra_cec if it is not under platform bus or it has been created with different name. Bug 200214224 Bug 200185815 Bug 1764073 Change-Id: Ib2f89db016982ca916894c37e47bbdf177fb617e Signed-off-by: Chun XU <chunx@nvidia.com> Reviewed-on: http://git-master/r/1175137 (cherry picked from commit 506e6370d234c4770afb22372ef1955faa7822cf)
This commit is contained in:
@@ -536,6 +536,18 @@ static int tegra_cec_probe(struct platform_device *pdev)
|
|||||||
goto cec_error;
|
goto cec_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a symlink for tegra_cec if it is not under platform bus or
|
||||||
|
* it has been created with different name.
|
||||||
|
*/
|
||||||
|
if ((pdev->dev.parent != &platform_bus) ||
|
||||||
|
strcmp(dev_name(&pdev->dev), TEGRA_CEC_NAME)) {
|
||||||
|
ret = sysfs_create_link(&platform_bus.kobj,
|
||||||
|
&pdev->dev.kobj, TEGRA_CEC_NAME);
|
||||||
|
if (ret)
|
||||||
|
dev_warn(&pdev->dev, "Could not create sysfs link.\n");
|
||||||
|
}
|
||||||
|
|
||||||
ret = sysfs_create_file(
|
ret = sysfs_create_file(
|
||||||
&pdev->dev.kobj, &dev_attr_cec_logical_addr_config.attr);
|
&pdev->dev.kobj, &dev_attr_cec_logical_addr_config.attr);
|
||||||
dev_info(&pdev->dev, "cec_add_sysfs ret=%d\n", ret);
|
dev_info(&pdev->dev, "cec_add_sysfs ret=%d\n", ret);
|
||||||
|
|||||||
Reference in New Issue
Block a user