diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-10-23 10:45:14 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-10-23 10:45:35 -0400 |
commit | c86f5ebfbd147d1a228ab89ee1658e18939bd7ad (patch) | |
tree | b3baa841455fa6f2623cb1060b5315e55ea30fe4 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | 49abb26651167c892393cd9f2ad23df429645ed9 (diff) |
drm/amdgpu: don't try to recreate sysfs entries on resume
Fixes an error on resume caused by:
fa022a9b65d2886486a022fd66b20c823cd76ad9
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index ed2bbe5b10af..22a8c7d3a3ab 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -695,6 +695,9 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) | |||
695 | { | 695 | { |
696 | int ret; | 696 | int ret; |
697 | 697 | ||
698 | if (adev->pm.sysfs_initialized) | ||
699 | return 0; | ||
700 | |||
698 | if (adev->pm.funcs->get_temperature == NULL) | 701 | if (adev->pm.funcs->get_temperature == NULL) |
699 | return 0; | 702 | return 0; |
700 | adev->pm.int_hwmon_dev = hwmon_device_register_with_groups(adev->dev, | 703 | adev->pm.int_hwmon_dev = hwmon_device_register_with_groups(adev->dev, |
@@ -723,6 +726,8 @@ int amdgpu_pm_sysfs_init(struct amdgpu_device *adev) | |||
723 | return ret; | 726 | return ret; |
724 | } | 727 | } |
725 | 728 | ||
729 | adev->pm.sysfs_initialized = true; | ||
730 | |||
726 | return 0; | 731 | return 0; |
727 | } | 732 | } |
728 | 733 | ||