dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: dw-hdmi-i2s: Make structure dw_hdmi_i2s_ops constant
@ 2019-08-13  9:06 Nishka Dasgupta
  0 siblings, 0 replies; only message in thread
From: Nishka Dasgupta @ 2019-08-13  9:06 UTC (permalink / raw)
  To: airlied, daniel, dri-devel, a.hajda, laurent.pinchart; +Cc: Nishka Dasgupta

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.linux@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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-08-13  9:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-13  9:06 [PATCH] drm: dw-hdmi-i2s: Make structure dw_hdmi_i2s_ops constant Nishka Dasgupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox