drm: bridge: dw-hdmi: constify snd_pcm_ops structures
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 9 Aug 2017 07:38:37 +0000 (13:08 +0530)
committerArchit Taneja <architt@codeaurora.org>
Wed, 9 Aug 2017 10:27:29 +0000 (15:57 +0530)
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/44c0ccab8b5658d17a3ed553e721136b53d95521.1502264156.git.arvind.yadav.cs@gmail.com
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c

index 8f2d1379c8809b8b8c428fb521c58bf1282d7c52..cf3f0caf9c632fe47dd5f48999031100e12cf68c 100644 (file)
@@ -517,7 +517,7 @@ static snd_pcm_uframes_t dw_hdmi_pointer(struct snd_pcm_substream *substream)
        return bytes_to_frames(runtime, dw->buf_offset);
 }
 
-static struct snd_pcm_ops snd_dw_hdmi_ops = {
+static const struct snd_pcm_ops snd_dw_hdmi_ops = {
        .open = dw_hdmi_open,
        .close = dw_hdmi_close,
        .ioctl = snd_pcm_lib_ioctl,