45 lines
1.6 KiB
Diff
45 lines
1.6 KiB
Diff
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72457
|
||
|
Upstream-status: should hit 3.13
|
||
|
|
||
|
From 2cbe7f259737e994d5a63c06a104027214e27978 Mon Sep 17 00:00:00 2001
|
||
|
From: Martin Andersson <g02maran@gmail.com>
|
||
|
Date: Sat, 7 Dec 2013 23:22:10 +0100
|
||
|
Subject: [PATCH] drm/radeon/dpm: Fix hwmon crash
|
||
|
|
||
|
Commit ec39f64bba3421c2060fcbd1aeb6eec81fe0a42d (drm/radeon/dpm: Convert
|
||
|
to use devm_hwmon_register_with_groups) converted one usage of
|
||
|
dev_get_drvdata, but there were two more.
|
||
|
|
||
|
Signed-off-by: Martin Andersson <g02maran@gmail.com>
|
||
|
---
|
||
|
drivers/gpu/drm/radeon/radeon_pm.c | 6 ++----
|
||
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
|
||
|
index dc75bb6..984097b 100644
|
||
|
--- a/drivers/gpu/drm/radeon/radeon_pm.c
|
||
|
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
|
||
|
@@ -552,8 +552,7 @@ static ssize_t radeon_hwmon_show_temp_thresh(struct device *dev,
|
||
|
struct device_attribute *attr,
|
||
|
char *buf)
|
||
|
{
|
||
|
- struct drm_device *ddev = dev_get_drvdata(dev);
|
||
|
- struct radeon_device *rdev = ddev->dev_private;
|
||
|
+ struct radeon_device *rdev = dev_get_drvdata(dev);
|
||
|
int hyst = to_sensor_dev_attr(attr)->index;
|
||
|
int temp;
|
||
|
|
||
|
@@ -580,8 +579,7 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
|
||
|
struct attribute *attr, int index)
|
||
|
{
|
||
|
struct device *dev = container_of(kobj, struct device, kobj);
|
||
|
- struct drm_device *ddev = dev_get_drvdata(dev);
|
||
|
- struct radeon_device *rdev = ddev->dev_private;
|
||
|
+ struct radeon_device *rdev = dev_get_drvdata(dev);
|
||
|
|
||
|
/* Skip limit attributes if DPM is not enabled */
|
||
|
if (rdev->pm.pm_method != PM_METHOD_DPM &&
|
||
|
--
|
||
|
1.8.4.2
|
||
|
|