drm/bridge: make drm_bridge_funcs const
authorBhumika Goyal <bhumirks@gmail.com>
Tue, 8 Aug 2017 15:54:10 +0000 (21:24 +0530)
committerArchit Taneja <architt@codeaurora.org>
Wed, 9 Aug 2017 10:22:32 +0000 (15:52 +0530)
Make these structures const as they are only stored in the funcs field
of drm_bridge structure, which is of type const.
Done using Coccinelle.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1502207650-20029-1-git-send-email-bhumirks@gmail.com
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c

index 682c090fa3edfe53565daa85381bd70849c111d8..a773a19c3440f05e036ee0c433293961b0a71b8e 100644 (file)
@@ -856,7 +856,7 @@ static int adv7511_bridge_attach(struct drm_bridge *bridge)
        return ret;
 }
 
-static struct drm_bridge_funcs adv7511_bridge_funcs = {
+static const struct drm_bridge_funcs adv7511_bridge_funcs = {
        .enable = adv7511_bridge_enable,
        .disable = adv7511_bridge_disable,
        .mode_set = adv7511_bridge_mode_set,
index 36f5ccbd179418c67cf7ffcc5a6c3f7179351f5e..63c7a01b7053eb80dfc852b83bfbd04b79d0a75a 100644 (file)
@@ -811,7 +811,7 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge)
        return drm_bridge_attach(bridge->encoder, dsi->panel_bridge, bridge);
 }
 
-static struct drm_bridge_funcs dw_mipi_dsi_bridge_funcs = {
+static const struct drm_bridge_funcs dw_mipi_dsi_bridge_funcs = {
        .mode_set     = dw_mipi_dsi_bridge_mode_set,
        .enable       = dw_mipi_dsi_bridge_enable,
        .post_disable = dw_mipi_dsi_bridge_post_disable,