From: Geliang Tang Date: Wed, 13 Jan 2016 14:48:43 +0000 (+0800) Subject: drm/radeon: use kobj_to_dev() X-Git-Tag: Ubuntu-5.13.0-19.19~16554^2~10^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e3837b00b6bb2b0344dd28c601edda8eba42de7f;p=mirror_ubuntu-jammy-kernel.git drm/radeon: 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/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 59abebd6b5dc..460c8f2989da 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -713,7 +713,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 radeon_device *rdev = dev_get_drvdata(dev); umode_t effective_mode = attr->mode;