Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc29ec87 authored by Geliang Tang's avatar Geliang Tang Committed by Alex Deucher
Browse files

drm/amdgpu: use kobj_to_dev()



Use kobj_to_dev() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 403664bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -326,7 +326,7 @@ static struct attribute *hwmon_attributes[] = {
static umode_t hwmon_attributes_visible(struct kobject *kobj,
static umode_t hwmon_attributes_visible(struct kobject *kobj,
					struct attribute *attr, int index)
					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);
	struct amdgpu_device *adev = dev_get_drvdata(dev);
	umode_t effective_mode = attr->mode;
	umode_t effective_mode = attr->mode;