[PATCH v2 3/3] drm/sysfs: Constify struct drm_sysfs_device_connector

Heiner Kallweit hkallweit1 at gmail.com
Sat Nov 2 21:48:42 UTC 2024


Constify struct drm_sysfs_device_connector to eliminate the risk of code
trying to change it.

Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
---
 drivers/gpu/drm/drm_sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 82e2d0c0d..c6b95fa06 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -50,7 +50,7 @@
  * drm_connector_unregister().
  */
 
-static struct device_type drm_sysfs_device_connector = {
+static const struct device_type drm_sysfs_device_connector = {
 	.name = "drm_connector",
 };
 
-- 
2.47.0




More information about the dri-devel mailing list