drm/rockchip: drv: Constify struct drm_driver

Add const qualifier to rockchip_drm_driver for immutability and safety.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I9d461c702432cf976a0c1413ae1c257faf405f10
This commit is contained in:
Sandy Huang
2025-03-18 17:52:36 +08:00
committed by Tao Huang
parent 3f74be339b
commit 2de761a61d

View File

@@ -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,