diff mbox series

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

Message ID 49a43f15-4a2e-4a9b-885b-0bb809969abe@gmail.com (mailing list archive)
State New
Headers show
Series drm: Series with core improvements/refactorings | expand

Commit Message

Heiner Kallweit Nov. 2, 2024, 9:48 p.m. UTC
Constify struct drm_sysfs_device_connector to eliminate the risk of code
trying to change it.

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

Comments

Dmitry Baryshkov Nov. 3, 2024, 4:06 a.m. UTC | #1
On Sat, Nov 02, 2024 at 10:48:42PM +0100, Heiner Kallweit wrote:
> Constify struct drm_sysfs_device_connector to eliminate the risk of code
> trying to change it.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/gpu/drm/drm_sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
diff mbox series

Patch

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",
 };