diff options
author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2013-05-03 07:08:01 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:10:53 -0700 |
commit | 0cfd012dfe0ac339c3d865871ade02728cd0dd9d (patch) | |
tree | 36cd7d008c12b2d87ff2bae31dd3c6cf682c2f62 /sound/pci | |
parent | 757f92f8bbe11ad66497b84b33488662573ce5d9 (diff) |
sound: hda: Use valid device reference
When sound card is connected to PCI device reference in
pdev is not valid and this causes segmentation fault on
dereferencing. Instead use the device stored in chip which
is validated.
Bug 1279846
Change-Id: I86ab2d629e84d1eb5e2e32ca67e9f831898bdd55
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/225073
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 905d08017f06..ae1937ace30a 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1518,7 +1518,7 @@ static void azx_platform_enable_clocks(struct azx *chip) #ifdef CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) && !defined(CONFIG_ARCH_TEGRA_3x_SOC) - pm_runtime_get_sync(&chip->pdev->dev); + pm_runtime_get_sync(chip->dev); tegra_unpowergate_partition(TEGRA_POWERGATE_DISB); #endif #endif @@ -1543,7 +1543,7 @@ static void azx_platform_disable_clocks(struct azx *chip) #ifdef CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) && !defined(CONFIG_ARCH_TEGRA_3x_SOC) tegra_powergate_partition(TEGRA_POWERGATE_DISB); - pm_runtime_put(&chip->pdev->dev); + pm_runtime_put(chip->dev); #endif #endif @@ -4200,8 +4200,8 @@ static int azx_probe_continue(struct azx *chip) goto out_free; #ifdef CONFIG_SND_HDA_PLATFORM_NVIDIA_TEGRA - pm_runtime_enable(&pdev->dev); - tegra_pd_add_device(&pdev->dev); + pm_runtime_enable(chip->dev); + tegra_pd_add_device(chip->dev); #endif chip->running = 1; |