[PATCH drm-misc 1/3] drm/dp: 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
dp_aux_device_type_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/display/drm_dp_aux_bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/display/drm_dp_aux_bus.c b/drivers/gpu/drm/display/drm_dp_aux_bus.c
index 5afc26be9d2a..f4c66937ef79 100644
--- a/drivers/gpu/drm/display/drm_dp_aux_bus.c
+++ b/drivers/gpu/drm/display/drm_dp_aux_bus.c
@@ -166,7 +166,7 @@ static int dp_aux_ep_dev_modalias(const struct device *dev, struct kobj_uevent_e
 	return of_device_uevent_modalias(dev, env);
 }
 
-static struct device_type dp_aux_device_type_type = {
+static const struct device_type dp_aux_device_type_type = {
 	.groups		= dp_aux_ep_dev_groups,
 	.uevent		= dp_aux_ep_dev_modalias,
 	.release	= dp_aux_ep_dev_release,

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