mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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:
parent
d6683bbe70
commit
01361096a3
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user