Skip to content

Commit 576d7cc

Browse files
rbmarliereogabbay
authored andcommitted
accel: constify the struct device_type usage
Since commit aed65af ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the accel_sysfs_device_minor variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
1 parent fa58b59 commit 576d7cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/accel/drm_accel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static struct idr accel_minors_idr;
2323

2424
static struct dentry *accel_debugfs_root;
2525

26-
static struct device_type accel_sysfs_device_minor = {
26+
static const struct device_type accel_sysfs_device_minor = {
2727
.name = "accel_minor"
2828
};
2929

0 commit comments

Comments
 (0)