diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-19 16:48:28 -0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2024-02-26 09:59:18 +0200 |
commit | 576d7cc5a9e29e4cc579ffb0f9afc209e34eea31 (patch) | |
tree | 5e3c6478b1a2db2441fed395560472a81b15d54c /drivers/accel | |
parent | fa58b59493665e81454079ad372b11a0ed34bd2d (diff) |
accel: constify the struct device_type usage
Since commit aed65af1cc2f ("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>
Diffstat (limited to 'drivers/accel')
-rw-r--r-- | drivers/accel/drm_accel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/accel/drm_accel.c b/drivers/accel/drm_accel.c index 24cac4c0274b..16c3edb8c46e 100644 --- a/drivers/accel/drm_accel.c +++ b/drivers/accel/drm_accel.c @@ -23,7 +23,7 @@ static struct idr accel_minors_idr; static struct dentry *accel_debugfs_root; -static struct device_type accel_sysfs_device_minor = { +static const struct device_type accel_sysfs_device_minor = { .name = "accel_minor" }; |