Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1732292 > unrolled thread

[PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-09-14 16:10 +0200
Last post2017-09-18 15:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const Bhumika Goyal <bhumirks@gmail.com> - 2017-09-14 16:10 +0200
    Re: [alsa-devel] [PATCH] ALSA: oxygen: Xonar DG(X): make  model_xonar_dg const Clemens Ladisch <clemens@ladisch.de> - 2017-09-14 20:50 +0200
    Re: [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const Takashi Iwai <tiwai@suse.de> - 2017-09-18 15:50 +0200

#1732292 — [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-09-14 16:10 +0200
Subject[PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const
Message-ID<upD06-62C-11@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1732509 — Re: [alsa-devel] [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const

FromClemens Ladisch <clemens@ladisch.de>
Date2017-09-14 20:50 +0200
SubjectRe: [alsa-devel] [PATCH] ALSA: oxygen: Xonar DG(X): make model_xonar_dg const
Message-ID<upHn4-e8-13@gated-at.bofh.it>
In reply to#1732292
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,

[toc] | [prev] | [next] | [standalone]


#1734136

FromTakashi Iwai <tiwai@suse.de>
Date2017-09-18 15:50 +0200
Message-ID<ur4AX-6Xw-37@gated-at.bofh.it>
In reply to#1732292
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web