drm/i915: Make kobj_type structures constant

Since commit ee6d3dd4ed ("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: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230216-kobj_type-i915-v1-1-ca65c9b93518@weissschuh.net
This commit is contained in:
Thomas Weißschuh 2023-02-16 01:05:30 +00:00 committed by Jani Nikula
parent d6683bbe70
commit 01361096a3
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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
};