Skip to content

Commit

Permalink
drm/xe: make kobject type struct as constant
Browse files Browse the repository at this point in the history
Since commit ee6d3dd ("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>
  • Loading branch information
Tejas Upadhyay authored and Rodrigo Vivi committed Dec 21, 2023
1 parent 43e82fb commit 55d8ac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/xe/xe_gt_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 55d8ac9

Please sign in to comment.