* [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const
@ 2017-09-14 14:04 Bhumika Goyal
2017-09-14 18:29 ` [alsa-devel] " Clemens Ladisch
2017-09-18 13:48 ` Takashi Iwai
0 siblings, 2 replies; 3+ messages in thread
From: Bhumika Goyal @ 2017-09-14 14:04 UTC (permalink / raw)
To: julia.lawall, clemens, perex, tiwai, alsa-devel, linux-kernel
Cc: Bhumika Goyal
Make this const as it not modified anywhere. It is only used during a
copy operation. Also, add const to the declaration in header.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
sound/pci/oxygen/xonar_dg.h | 2 +-
sound/pci/oxygen/xonar_dg_mixer.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/oxygen/xonar_dg.h b/sound/pci/oxygen/xonar_dg.h
index d461df3..5a07cda 100644
--- a/sound/pci/oxygen/xonar_dg.h
+++ b/sound/pci/oxygen/xonar_dg.h
@@ -51,6 +51,6 @@ void dump_cs4245_registers(struct oxygen *chip,
void dg_resume(struct oxygen *chip);
void dg_cleanup(struct oxygen *chip);
-extern struct oxygen_model model_xonar_dg;
+extern const struct oxygen_model model_xonar_dg;
#endif
diff --git a/sound/pci/oxygen/xonar_dg_mixer.c b/sound/pci/oxygen/xonar_dg_mixer.c
index b885dac..d22fbe8 100644
--- a/sound/pci/oxygen/xonar_dg_mixer.c
+++ b/sound/pci/oxygen/xonar_dg_mixer.c
@@ -449,7 +449,7 @@ static int dg_mixer_init(struct oxygen *chip)
return 0;
}
-struct oxygen_model model_xonar_dg = {
+const struct oxygen_model model_xonar_dg = {
.longname = "C-Media Oxygen HD Audio",
.chip = "CMI8786",
.init = dg_init,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const
2017-09-14 14:04 [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const Bhumika Goyal
@ 2017-09-14 18:29 ` Clemens Ladisch
2017-09-18 13:48 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Clemens Ladisch @ 2017-09-14 18:29 UTC (permalink / raw)
To: tiwai; +Cc: Bhumika Goyal, alsa-devel, linux-kernel
Bhumika Goyal wrote:
> Make this const as it not modified anywhere. It is only used during a
> copy operation. Also, add const to the declaration in header.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
> ---
> sound/pci/oxygen/xonar_dg.h | 2 +-
> sound/pci/oxygen/xonar_dg_mixer.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/oxygen/xonar_dg.h b/sound/pci/oxygen/xonar_dg.h
> index d461df3..5a07cda 100644
> --- a/sound/pci/oxygen/xonar_dg.h
> +++ b/sound/pci/oxygen/xonar_dg.h
> @@ -51,6 +51,6 @@ void dump_cs4245_registers(struct oxygen *chip,
> void dg_resume(struct oxygen *chip);
> void dg_cleanup(struct oxygen *chip);
>
> -extern struct oxygen_model model_xonar_dg;
> +extern const struct oxygen_model model_xonar_dg;
>
> #endif
> diff --git a/sound/pci/oxygen/xonar_dg_mixer.c b/sound/pci/oxygen/xonar_dg_mixer.c
> index b885dac..d22fbe8 100644
> --- a/sound/pci/oxygen/xonar_dg_mixer.c
> +++ b/sound/pci/oxygen/xonar_dg_mixer.c
> @@ -449,7 +449,7 @@ static int dg_mixer_init(struct oxygen *chip)
> return 0;
> }
>
> -struct oxygen_model model_xonar_dg = {
> +const struct oxygen_model model_xonar_dg = {
> .longname = "C-Media Oxygen HD Audio",
> .chip = "CMI8786",
> .init = dg_init,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const
2017-09-14 14:04 [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const Bhumika Goyal
2017-09-14 18:29 ` [alsa-devel] " Clemens Ladisch
@ 2017-09-18 13:48 ` Takashi Iwai
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-09-18 13:48 UTC (permalink / raw)
To: Bhumika Goyal; +Cc: alsa-devel, clemens, julia.lawall, perex, linux-kernel
On Thu, 14 Sep 2017 16:04:15 +0200,
Bhumika Goyal wrote:
>
> Make this const as it not modified anywhere. It is only used during a
> copy operation. Also, add const to the declaration in header.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-18 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14 14:04 [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const Bhumika Goyal
2017-09-14 18:29 ` [alsa-devel] " Clemens Ladisch
2017-09-18 13:48 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).