From: Geliang Tang Date: Wed, 13 Jan 2016 14:48:42 +0000 (+0800) Subject: drm/amdgpu: use kobj_to_dev() X-Git-Tag: v4.14-rc1~3993^2~10^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc29ec874b3727e3f5a606bd1875e34f6e3f1593;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Alex Deucher --- 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;