From 2de761a61d71d8f4f185c8df1c844b2ab57d9aa0 Mon Sep 17 00:00:00 2001 From: Sandy Huang Date: Tue, 18 Mar 2025 17:52:36 +0800 Subject: [PATCH] drm/rockchip: drv: Constify struct drm_driver Add const qualifier to rockchip_drm_driver for immutability and safety. Signed-off-by: Sandy Huang Change-Id: I9d461c702432cf976a0c1413ae1c257faf405f10 --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 21ce75771895..0d3cbb1bab5e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -73,7 +73,7 @@ static bool is_support_iommu = true; #endif static bool iommu_reserve_map; -static struct drm_driver rockchip_drm_driver; +static const struct drm_driver rockchip_drm_driver; static unsigned int drm_debug; module_param_named(debug, drm_debug, int, 0600); @@ -2250,7 +2250,7 @@ struct dma_buf *rockchip_drm_gem_prime_export(struct drm_gem_object *obj, DEFINE_DRM_GEM_FOPS(rockchip_drm_driver_fops); -static struct drm_driver rockchip_drm_driver = { +static const struct drm_driver rockchip_drm_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC | DRIVER_RENDER, .postclose = rockchip_drm_postclose, .lastclose = rockchip_drm_lastclose,