From 4de503bde4d76e8d75b226c316ba9f879c09cfb9 Mon Sep 17 00:00:00 2001 From: Michal Wajdeczko Date: Tue, 12 May 2026 20:33:42 +0200 Subject: [PATCH] drm/xe: Make drm_driver const After removing runtime modification to our drm_driver definitions, we can make them const as they should be. Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Jani Nikula Reviewed-by: Jani Nikula Link: https://patch.msgid.link/20260512183342.3374-8-michal.wajdeczko@intel.com --- drivers/gpu/drm/xe/xe_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 7519cda3f42c..576095cf0952 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -391,7 +391,7 @@ bool xe_is_xe_file(const struct file *file) return file->f_op == &xe_driver_fops; } -static struct drm_driver regular_driver = { +static const struct drm_driver regular_driver = { .driver_features = XE_DISPLAY_DRIVER_FEATURES | DRIVER_GEM | @@ -424,7 +424,7 @@ static const struct drm_ioctl_desc xe_ioctls_admin_only[] = { DRM_IOCTL_DEF_DRV(XE_OBSERVATION, xe_observation_ioctl, DRM_RENDER_ALLOW), }; -static struct drm_driver admin_only_driver = { +static const struct drm_driver admin_only_driver = { .driver_features = XE_DISPLAY_DRIVER_FEATURES | DRIVER_GEM | DRIVER_RENDER | DRIVER_GEM_GPUVA, @@ -478,7 +478,7 @@ static void xe_device_destroy(struct drm_device *dev, void *dummy) struct xe_device *xe_device_create(struct pci_dev *pdev, const struct pci_device_id *ent) { - struct drm_driver *driver = ®ular_driver; + const struct drm_driver *driver = ®ular_driver; struct xe_device *xe; int err;