[PATCH drm-misc 2/3] drm/privacy_screen: constify the struct device_type usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
drm_privacy_screen_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ricardo B. Marliere <ricardo@xxxxxxxxxxxx>
---
 drivers/gpu/drm/drm_privacy_screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_privacy_screen.c b/drivers/gpu/drm/drm_privacy_screen.c
index 6cc39e30781f..088a30b3b488 100644
--- a/drivers/gpu/drm/drm_privacy_screen.c
+++ b/drivers/gpu/drm/drm_privacy_screen.c
@@ -363,7 +363,7 @@ static struct attribute *drm_privacy_screen_attrs[] = {
 };
 ATTRIBUTE_GROUPS(drm_privacy_screen);
 
-static struct device_type drm_privacy_screen_type = {
+static const struct device_type drm_privacy_screen_type = {
 	.name = "privacy_screen",
 	.groups = drm_privacy_screen_groups,
 };

-- 
2.43.0




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux