[PATCH] drm: i915: gt: replace __ATTR() with __ATTR_RO()
Salah Triki
salah.triki at gmail.com
Sun Apr 27 19:30:42 UTC 2025
Replace __ATTR() with __ATTR_RO() to make code cleaner.
Signed-off-by: Salah Triki <salah.triki at gmail.com>
---
drivers/gpu/drm/i915/gt/sysfs_engines.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/sysfs_engines.c b/drivers/gpu/drm/i915/gt/sysfs_engines.c
index aab2759067d2..f6149167de05 100644
--- a/drivers/gpu/drm/i915/gt/sysfs_engines.c
+++ b/drivers/gpu/drm/i915/gt/sysfs_engines.c
@@ -27,8 +27,7 @@ name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
return sysfs_emit(buf, "%s\n", kobj_to_engine(kobj)->name);
}
-static const struct kobj_attribute name_attr =
-__ATTR(name, 0444, name_show, NULL);
+static const struct kobj_attribute name_attr = __ATTR_RO(name);
static ssize_t
class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
--
2.43.0
More information about the dri-devel
mailing list