diff options
author | Geliang Tang <geliangtang@163.com> | 2016-01-13 17:48:42 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-13 20:14:59 +0300 |
commit | cc29ec874b3727e3f5a606bd1875e34f6e3f1593 (patch) | |
tree | 8e387e1b8eae223692d3116f1237852d7c8324dc /drivers/gpu | |
parent | 403664bbf840e80a45c4b97115ac518b40487f91 (diff) | |
download | linux-cc29ec874b3727e3f5a606bd1875e34f6e3f1593.tar.xz |
drm/amdgpu: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 4386cbac7f97..7d8d84eaea4a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -326,7 +326,7 @@ static struct attribute *hwmon_attributes[] = { static umode_t hwmon_attributes_visible(struct kobject *kobj, struct attribute *attr, int index) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct amdgpu_device *adev = dev_get_drvdata(dev); umode_t effective_mode = attr->mode; |