summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorAnuj Gangwar <anujg@nvidia.com>2018-11-14 06:36:46 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-12-18 01:56:45 -0500
commitbb55cea50b9b774c24779980fab155898aca277c (patch)
tree5de78841f92f4244d9b7a46e0582448af3033ac1 /sound/pci/hda
parent0d77473194fd720981d9a1ab2653bf4100993889 (diff)
pci:hda: fix lockdep warning
Dynamically allocated sysfs attributes must call sysfs_attr_init if lockdep is enabled. Bug 200464909 Bug 200451465 Change-Id: I603c4f373e83cf6242a3737e58c5d6fd3a3c1cbc Signed-off-by: Anuj Gangwar <anujg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1950685 (cherry picked from commit 39132d63f7078aba04bef488d887197c011c6afb) Reviewed-on: https://git-master.nvidia.com/r/1972844 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Leon Yu <leoyu@nvidia.com> Tested-by: Leon Yu <leoyu@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_tegra.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c
index 08f0ce256..0b18e5a2a 100644
--- a/sound/pci/hda/hda_tegra.c
+++ b/sound/pci/hda/hda_tegra.c
@@ -703,11 +703,13 @@ static int hda_tegra_create_sysfs(struct hda_tegra *hda)
703 return -ENOMEM; 703 return -ENOMEM;
704 704
705 /* attributes for pcm device ID */ 705 /* attributes for pcm device ID */
706 sysfs_attr_init(&(pcm_dev->pcm_attr.attr));
706 pcm_dev->pcm_attr.attr.name = "pcm_dev_id"; 707 pcm_dev->pcm_attr.attr.name = "pcm_dev_id";
707 pcm_dev->pcm_attr.attr.mode = 0644; 708 pcm_dev->pcm_attr.attr.mode = 0644;
708 pcm_dev->pcm_attr.show = hda_get_pcm_device_id; 709 pcm_dev->pcm_attr.show = hda_get_pcm_device_id;
709 710
710 /* attributes for switch name */ 711 /* attributes for switch name */
712 sysfs_attr_init(&(pcm_dev->name_attr.attr));
711 pcm_dev->name_attr.attr.name = "switch_name"; 713 pcm_dev->name_attr.attr.name = "switch_name";
712 pcm_dev->name_attr.attr.mode = 0644; 714 pcm_dev->name_attr.attr.mode = 0644;
713 pcm_dev->name_attr.show = hda_get_pcm_switch_name; 715 pcm_dev->name_attr.show = hda_get_pcm_switch_name;