Static structure dw_hdmi_i2s_ops, of type hdmi_codec_ops, is used only
when assigned as a value to field ops of variable pdata, which has type
hdmi_codec_pdata. Field ops of hdmi_codec_pdata is declared as a const;
hence make dw_hdmi_i2s_ops constant as well.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.li...@gmail.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c 
b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
index 5cbb71a866d5..35daf9a21708 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
@@ -104,7 +104,7 @@ static int dw_hdmi_i2s_get_dai_id(struct snd_soc_component 
*component,
        return -EINVAL;
 }
 
-static struct hdmi_codec_ops dw_hdmi_i2s_ops = {
+static const struct hdmi_codec_ops dw_hdmi_i2s_ops = {
        .hw_params      = dw_hdmi_i2s_hw_params,
        .audio_shutdown = dw_hdmi_i2s_audio_shutdown,
        .get_dai_id     = dw_hdmi_i2s_get_dai_id,
-- 
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to