2017-08-17 10:07:03

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 00/15] constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Arvind Yadav (15):
[PATCH 01/15] ALSA: drivers: mpu401: constify pnp_device_id
[PATCH 02/15] ALSA: es18xx: constify pnp_device_id and pnp_card_device_id
[PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id
[PATCH 04/15] ALSA: ad1816a: constify pnp_card_device_id
[PATCH 05/15] ALSA: als100: constify pnp_card_device_id
[PATCH 06/15] ALSA: azt2320: constify pnp_card_device_id
[PATCH 07/15] ALSA: cmi8330: constify pnp_card_device_id
[PATCH 08/15] ALSA: cs4236: constify pnp_card_device_id
[PATCH 09/15] ALSA: es1688: constify pnp_card_device_id
[PATCH 10/15] ALSA: gus: constify pnp_card_device_id
[PATCH 11/15] ALSA: msnd: constify pnp_card_device_id
[PATCH 12/15] ALSA: opti9xx: constify pnp_card_device_id
[PATCH 13/15] ALSA: sb16: constify pnp_card_device_id
[PATCH 14/15] ALSA: sscape: constify pnp_card_device_id
[PATCH 15/15] ALSA: wavefront: constify pnp_card_device_id

sound/drivers/mpu401/mpu401.c | 2 +-
sound/isa/ad1816a/ad1816a.c | 2 +-
sound/isa/als100.c | 2 +-
sound/isa/azt2320.c | 2 +-
sound/isa/cmi8330.c | 2 +-
sound/isa/cs423x/cs4236.c | 2 +-
sound/isa/es1688/es1688.c | 2 +-
sound/isa/es18xx.c | 4 ++--
sound/isa/gus/interwave.c | 2 +-
sound/isa/msnd/msnd_pinnacle.c | 2 +-
sound/isa/opl3sa2.c | 4 ++--
sound/isa/opti9xx/miro.c | 2 +-
sound/isa/opti9xx/opti92x-ad1848.c | 2 +-
sound/isa/sb/sb16.c | 2 +-
sound/isa/sscape.c | 2 +-
sound/isa/wavefront/wavefront.c | 2 +-
16 files changed, 18 insertions(+), 18 deletions(-)

--
2.7.4


2017-08-17 10:07:13

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
sound/isa/opl3sa2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 4098e3e0..7cce4cd 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -141,7 +141,7 @@ struct snd_opl3sa2 {

#ifdef CONFIG_PNP

-static struct pnp_device_id snd_opl3sa2_pnpbiosids[] = {
+static const struct pnp_device_id snd_opl3sa2_pnpbiosids[] = {
{ .id = "YMH0021" },
{ .id = "NMX2210" }, /* Gateway Solo 2500 */
{ .id = "" } /* end */
@@ -149,7 +149,7 @@ static struct pnp_device_id snd_opl3sa2_pnpbiosids[] = {

MODULE_DEVICE_TABLE(pnp, snd_opl3sa2_pnpbiosids);

-static struct pnp_card_device_id snd_opl3sa2_pnpids[] = {
+static const struct pnp_card_device_id snd_opl3sa2_pnpids[] = {
/* Yamaha YMF719E-S (Genius Sound Maker 3DX) */
{ .id = "YMH0020", .devs = { { "YMH0021" } } },
/* Yamaha OPL3-SA3 (integrated on Intel's Pentium II AL440LX motherboard) */
--
2.7.4

2017-08-17 10:07:16

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 06/15] ALSA: azt2320: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/azt2320.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
index fff186f..4e6fad4 100644
--- a/sound/isa/azt2320.c
+++ b/sound/isa/azt2320.c
@@ -79,7 +79,7 @@ struct snd_card_azt2320 {
struct snd_wss *chip;
};

-static struct pnp_card_device_id snd_azt2320_pnpids[] = {
+static const struct pnp_card_device_id snd_azt2320_pnpids[] = {
/* PRO16V */
{ .id = "AZT1008", .devs = { { "AZT1008" }, { "AZT2001" }, } },
/* Aztech Sound Galaxy 16 */
--
2.7.4

2017-08-17 10:07:19

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 07/15] ALSA: cmi8330: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/cmi8330.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index f64b29a..6b8c469 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -182,7 +182,7 @@ struct snd_cmi8330 {

#ifdef CONFIG_PNP

-static struct pnp_card_device_id snd_cmi8330_pnpids[] = {
+static const struct pnp_card_device_id snd_cmi8330_pnpids[] = {
{ .id = "CMI0001", .devs = { { "@X@0001" }, { "@@@0001" }, { "@H@0001" }, { "A@@0001" } } },
{ .id = "CMI0001", .devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" } } },
{ .id = "" }
--
2.7.4

2017-08-17 10:07:24

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 09/15] ALSA: es1688: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/es1688/es1688.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index 36320e7..a826c13 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -321,7 +321,7 @@ static int snd_es968_pnp_resume(struct pnp_card_link *pcard)
}
#endif

-static struct pnp_card_device_id snd_es968_pnpids[] = {
+static const struct pnp_card_device_id snd_es968_pnpids[] = {
{ .id = "ESS0968", .devs = { { "@@@0968" }, } },
{ .id = "ESS0968", .devs = { { "ESS0968" }, } },
{ .id = "", } /* end */
--
2.7.4

2017-08-17 10:07:30

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 11/15] ALSA: msnd: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/msnd/msnd_pinnacle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
index ad48973..86db009 100644
--- a/sound/isa/msnd/msnd_pinnacle.c
+++ b/sound/isa/msnd/msnd_pinnacle.c
@@ -1191,7 +1191,7 @@ static void snd_msnd_pnp_remove(struct pnp_card_link *pcard)
static int isa_registered;
static int pnp_registered;

-static struct pnp_card_device_id msnd_pnpids[] = {
+static const struct pnp_card_device_id msnd_pnpids[] = {
/* Pinnacle PnP */
{ .id = "BVJ0440", .devs = { { "TBS0000" }, { "TBS0001" } } },
{ .id = "" } /* end */
--
2.7.4

2017-08-17 10:07:32

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 13/15] ALSA: sb16: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/sb/sb16.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c
index 917a93d..8f9ebeb 100644
--- a/sound/isa/sb/sb16.c
+++ b/sound/isa/sb/sb16.c
@@ -145,7 +145,7 @@ struct snd_card_sb16 {

#ifdef CONFIG_PNP

-static struct pnp_card_device_id snd_sb16_pnpids[] = {
+static const struct pnp_card_device_id snd_sb16_pnpids[] = {
#ifndef SNDRV_SBAWE
/* Sound Blaster 16 PnP */
{ .id = "CTL0024", .devs = { { "CTL0031" } } },
--
2.7.4

2017-08-17 10:07:36

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 14/15] ALSA: sscape: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/sscape.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 1cd2908..733adee 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -88,7 +88,7 @@ MODULE_PARM_DESC(joystick, "Enable gameport.");
static int isa_registered;
static int pnp_registered;

-static struct pnp_card_device_id sscape_pnpids[] = {
+static const struct pnp_card_device_id sscape_pnpids[] = {
{ .id = "ENS3081", .devs = { { "ENS0000" } } }, /* Soundscape PnP */
{ .id = "ENS4081", .devs = { { "ENS1011" } } }, /* VIVO90 */
{ .id = "" } /* end */
--
2.7.4

2017-08-17 10:07:45

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 15/15] ALSA: wavefront: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/wavefront/wavefront.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index da4e9a8..b1989fa 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -88,7 +88,7 @@ MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly lo
static int isa_registered;
static int pnp_registered;

-static struct pnp_card_device_id snd_wavefront_pnpids[] = {
+static const struct pnp_card_device_id snd_wavefront_pnpids[] = {
/* Tropez */
{ .id = "CSC7532", .devs = { { "CSC0000" }, { "CSC0010" }, { "PnPb006" }, { "CSC0004" } } },
/* Tropez+ */
--
2.7.4

2017-08-17 10:08:30

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 12/15] ALSA: opti9xx: constify pnp_card_device_id

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 <[email protected]>
---
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

2017-08-17 10:09:02

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 10/15] ALSA: gus: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/gus/interwave.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 0687b7e..a6fc26b 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -136,7 +136,7 @@ struct snd_interwave {
static int isa_registered;
static int pnp_registered;

-static struct pnp_card_device_id snd_interwave_pnpids[] = {
+static const struct pnp_card_device_id snd_interwave_pnpids[] = {
#ifndef SNDRV_STB
/* Gravis UltraSound Plug & Play */
{ .id = "GRV0001", .devs = { { .id = "GRV0000" } } },
--
2.7.4

2017-08-17 10:09:46

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 08/15] ALSA: cs4236: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/cs423x/cs4236.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index 1f9a3b2..14bba64 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -149,7 +149,7 @@ static const struct pnp_device_id snd_cs423x_pnpbiosids[] = {
MODULE_DEVICE_TABLE(pnp, snd_cs423x_pnpbiosids);

#define CS423X_ISAPNP_DRIVER "cs4232_isapnp"
-static struct pnp_card_device_id snd_cs423x_pnpids[] = {
+static const struct pnp_card_device_id snd_cs423x_pnpids[] = {
/* Philips PCA70PS */
{ .id = "CSC0d32", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
/* TerraTec Maestro 32/96 (CS4232) */
--
2.7.4

2017-08-17 10:10:24

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 04/15] ALSA: ad1816a: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/ad1816a/ad1816a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 7692265..4be6c12 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -63,7 +63,7 @@ MODULE_PARM_DESC(enable, "Enable ad1816a based soundcard.");
module_param_array(clockfreq, int, NULL, 0444);
MODULE_PARM_DESC(clockfreq, "Clock frequency for ad1816a driver (default = 0).");

-static struct pnp_card_device_id snd_ad1816a_pnpids[] = {
+static const struct pnp_card_device_id snd_ad1816a_pnpids[] = {
/* Analog Devices AD1815 */
{ .id = "ADS7150", .devs = { { .id = "ADS7150" }, { .id = "ADS7151" } } },
/* Analog Device AD1816? */
--
2.7.4

2017-08-17 10:10:23

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 05/15] ALSA: als100: constify pnp_card_device_id

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 <[email protected]>
---
sound/isa/als100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/als100.c b/sound/isa/als100.c
index bc9ea30..dde6ba4 100644
--- a/sound/isa/als100.c
+++ b/sound/isa/als100.c
@@ -79,7 +79,7 @@ struct snd_card_als100 {
struct snd_sb *chip;
};

-static struct pnp_card_device_id snd_als100_pnpids[] = {
+static const struct pnp_card_device_id snd_als100_pnpids[] = {
/* DT197A30 */
{ .id = "RWB1688",
.devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" } },
--
2.7.4

2017-08-17 10:10:55

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 02/15] ALSA: es18xx: constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
sound/isa/es18xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index ae17a65..5d4a30a 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2017,7 +2017,7 @@ static int isa_registered;
static int pnp_registered;
static int pnpc_registered;

-static struct pnp_device_id snd_audiodrive_pnpbiosids[] = {
+static const struct pnp_device_id snd_audiodrive_pnpbiosids[] = {
{ .id = "ESS1869" },
{ .id = "ESS1879" },
{ .id = "" } /* end */
@@ -2062,7 +2062,7 @@ static int snd_audiodrive_pnp(int dev, struct snd_es18xx *chip,
return 0;
}

-static struct pnp_card_device_id snd_audiodrive_pnpids[] = {
+static const struct pnp_card_device_id snd_audiodrive_pnpids[] = {
/* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */
{ .id = "ESS1868", .devs = { { "ESS1868" }, { "ESS0000" } } },
/* ESS 1868 (integrated on Maxisound Cards) */
--
2.7.4

2017-08-17 10:11:44

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 01/15] ALSA: drivers: mpu401: constify pnp_device_id

pnp_device_id are not supposed to change at runtime. All functions
working with pnp_device_id provided by <linux/pnp.h> work with
const pnp_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
sound/drivers/mpu401/mpu401.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 9b86e00..b671576 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -148,7 +148,7 @@ static struct platform_driver snd_mpu401_driver = {

#define IO_EXTENT 2

-static struct pnp_device_id snd_mpu401_pnpids[] = {
+static const struct pnp_device_id snd_mpu401_pnpids[] = {
{ .id = "PNPb006" },
{ .id = "" }
};
--
2.7.4

2017-08-17 10:48:59

by Takashi Iwai

[permalink] [raw]
Subject: Re: [PATCH 00/15] constify pnp_device_id and pnp_card_device_id

On Thu, 17 Aug 2017 12:06:15 +0200,
Arvind Yadav wrote:
>
> *_device_id are not supposed to change at runtime. All functions
> working with *_device_id provided by <linux/pnp.h> work with
> const *_device_id. So mark the non-const structs as const.
>
> Arvind Yadav (15):
> [PATCH 01/15] ALSA: drivers: mpu401: constify pnp_device_id
> [PATCH 02/15] ALSA: es18xx: constify pnp_device_id and pnp_card_device_id
> [PATCH 03/15] ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id
> [PATCH 04/15] ALSA: ad1816a: constify pnp_card_device_id
> [PATCH 05/15] ALSA: als100: constify pnp_card_device_id
> [PATCH 06/15] ALSA: azt2320: constify pnp_card_device_id
> [PATCH 07/15] ALSA: cmi8330: constify pnp_card_device_id
> [PATCH 08/15] ALSA: cs4236: constify pnp_card_device_id
> [PATCH 09/15] ALSA: es1688: constify pnp_card_device_id
> [PATCH 10/15] ALSA: gus: constify pnp_card_device_id
> [PATCH 11/15] ALSA: msnd: constify pnp_card_device_id
> [PATCH 12/15] ALSA: opti9xx: constify pnp_card_device_id
> [PATCH 13/15] ALSA: sb16: constify pnp_card_device_id
> [PATCH 14/15] ALSA: sscape: constify pnp_card_device_id
> [PATCH 15/15] ALSA: wavefront: constify pnp_card_device_id

Applied all patches now. Thanks.


Takashi