Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1308470

[PATCH 4/5] drm/amdgpu: use kobj_to_dev()

From Geliang Tang <geliangtang@163.com>
Newsgroups linux.kernel
Subject [PATCH 4/5] drm/amdgpu: use kobj_to_dev()
Date 2016-01-13 15:50 +0100
Message-ID <qQuUi-15y-13@gated-at.bofh.it> (permalink)
References <qQuUh-15y-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Use kobj_to_dev() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@163.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 4386cba..7d8d84e 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;
 
-- 
2.5.0

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 4/5] drm/amdgpu: use kobj_to_dev() Geliang Tang <geliangtang@163.com> - 2016-01-13 15:50 +0100

csiph-web