drm/dp/mst: constify drm_dp_mst_topology_cbs structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 30 Dec 2015 21:20:30 +0000 (22:20 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 4 Jan 2016 07:09:58 +0000 (08:09 +0100)
The drm_dp_mst_topology_cbs structures are never modified, so declare them
as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp_mst.c
drivers/gpu/drm/radeon/radeon_dp_mst.c
include/drm/drm_dp_mst_helper.h

index e8d369d0a713fc6ed1e8ca1b9fa6c53733c91d78..9ae1a4fc5bb1d857b76df62498f1b74c29770285 100644 (file)
@@ -512,7 +512,7 @@ static void intel_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)
        drm_kms_helper_hotplug_event(dev);
 }
 
-static struct drm_dp_mst_topology_cbs mst_cbs = {
+static const struct drm_dp_mst_topology_cbs mst_cbs = {
        .add_connector = intel_dp_add_mst_connector,
        .register_connector = intel_dp_register_mst_connector,
        .destroy_connector = intel_dp_destroy_mst_connector,
index 94323f51ffcfb37e1292c225e793c925179dd563..8a0222573f6ac388a09eacafc3a3869792b5ba3c 100644 (file)
@@ -329,7 +329,7 @@ static void radeon_dp_mst_hotplug(struct drm_dp_mst_topology_mgr *mgr)
        drm_kms_helper_hotplug_event(dev);
 }
 
-struct drm_dp_mst_topology_cbs mst_cbs = {
+const struct drm_dp_mst_topology_cbs mst_cbs = {
        .add_connector = radeon_dp_add_mst_connector,
        .register_connector = radeon_dp_register_mst_connector,
        .destroy_connector = radeon_dp_destroy_mst_connector,
index 5340099741aec8c48575b1c1056f23903e150ed6..16663713cc9f8d5141217cbe88e8eb0a96e870c2 100644 (file)
@@ -420,7 +420,7 @@ struct drm_dp_payload {
 struct drm_dp_mst_topology_mgr {
 
        struct device *dev;
-       struct drm_dp_mst_topology_cbs *cbs;
+       const struct drm_dp_mst_topology_cbs *cbs;
        int max_dpcd_transaction_bytes;
        struct drm_dp_aux *aux; /* auxch for this topology mgr to use */
        int max_payloads;