Commit 01361096 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Jani Nikula

drm/i915: Make kobj_type structures constant

Since commit ee6d3dd4 ("driver core: make kobj_type constant.")
the driver core allows the usage of const struct kobj_type.

Take advantage of this to constify the structure definitions to prevent
modification at runtime.
Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216-kobj_type-i915-v1-1-ca65c9b93518@weissschuh.net
parent d6683bbe
......@@ -72,7 +72,7 @@ static void kobj_gt_release(struct kobject *kobj)
{
}
static struct kobj_type kobj_gt_type = {
static const struct kobj_type kobj_gt_type = {
.release = kobj_gt_release,
.sysfs_ops = &kobj_sysfs_ops,
.default_groups = id_groups,
......
......@@ -419,7 +419,7 @@ static void kobj_engine_release(struct kobject *kobj)
kfree(kobj);
}
static struct kobj_type kobj_engine_type = {
static const struct kobj_type kobj_engine_type = {
.release = kobj_engine_release,
.sysfs_ops = &kobj_sysfs_ops
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment