From: Laurent Pinchart Date: Mon, 24 Feb 2020 23:00:56 +0000 (+0200) Subject: drm/bridge: lvds-codec: Constify the drm_bridge_funcs structure X-Git-Tag: v5.7-rc1~136^2~16^2~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a628a073157b59bd3af7225331f89ba5bd6abb7a;p=thirdparty%2Flinux.git drm/bridge: lvds-codec: Constify the drm_bridge_funcs structure The drm_bridge_funcs structure is never modified, make it const. Making it read-only can improve security as the structure contains function pointers. Signed-off-by: Laurent Pinchart Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20200224230056.2157-1-laurent.pinchart+renesas@ideasonboard.com --- diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c index ae173d84dc8f2..f7ae28ed1c141 100644 --- a/drivers/gpu/drm/bridge/lvds-codec.c +++ b/drivers/gpu/drm/bridge/lvds-codec.c @@ -50,7 +50,7 @@ static void lvds_codec_disable(struct drm_bridge *bridge) gpiod_set_value_cansleep(lvds_codec->powerdown_gpio, 1); } -static struct drm_bridge_funcs funcs = { +static const struct drm_bridge_funcs funcs = { .attach = lvds_codec_attach, .enable = lvds_codec_enable, .disable = lvds_codec_disable,