drm/xe: make kobject type struct as constant
Since commit ee6d3dd4ed48 ("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 definition to prevent modification at runtime. Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
43e82fb9ec
commit
55d8ac9631
@ -17,7 +17,7 @@ static void xe_gt_sysfs_kobj_release(struct kobject *kobj)
|
||||
kfree(kobj);
|
||||
}
|
||||
|
||||
static struct kobj_type xe_gt_sysfs_kobj_type = {
|
||||
static const struct kobj_type xe_gt_sysfs_kobj_type = {
|
||||
.release = xe_gt_sysfs_kobj_release,
|
||||
.sysfs_ops = &kobj_sysfs_ops,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user