Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1713757
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/15] ALSA: opti9xx: constify pnp_card_device_id |
| Date | 2017-08-17 12:10 +0200 |
| Message-ID | <ufpUu-3mI-31@gated-at.bofh.it> (permalink) |
| References | <ufpUt-3mI-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
sound/isa/opti9xx/miro.c | 2 +-
sound/isa/opti9xx/opti92x-ad1848.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index bcbff56..3f760b3 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -143,7 +143,7 @@ static int snd_miro_pnp_is_probed;
#ifdef CONFIG_PNP
-static struct pnp_card_device_id snd_miro_pnpids[] = {
+static const struct pnp_card_device_id snd_miro_pnpids[] = {
/* PCM20 and PCM12 in PnP mode */
{ .id = "MIR0924",
.devs = { { "MIR0000" }, { "MIR0002" }, { "MIR0005" } }, },
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index ceddb39..040f06f 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -151,7 +151,7 @@ static int snd_opti9xx_pnp_is_probed;
#ifdef CONFIG_PNP
-static struct pnp_card_device_id snd_opti9xx_pnpids[] = {
+static const struct pnp_card_device_id snd_opti9xx_pnpids[] = {
#ifndef OPTi93X
/* OPTi 82C924 */
{ .id = "OPT0924",
--
2.7.4
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 12/15] ALSA: opti9xx: constify pnp_card_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 12:10 +0200
csiph-web