constify alsa snd_pcm_ops structures
Subsystems (11)
cover constify alsa snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
Arvind Yadav (13):
[PATCH 01/13] ALSA: aoa: constify snd_pcm_ops structures [PATCH 02/13] ALSA: arm: constify snd_pcm_ops structures [PATCH 03/13] ALSA: atmel: constify snd_pcm_ops structures [PATCH 04/13] ALSA: drivers: constify snd_pcm_ops structures [PATCH 05/13] ALSA: firewire: constify snd_pcm_ops structures [PATCH 06/13] ALSA: mips: constify snd_pcm_ops structures [PATCH 07/13] ALSA: parisc: constify snd_pcm_ops structures [PATCH 08/13] ALSA: pcmcia: constify snd_pcm_ops structures [PATCH 09/13] ALSA: ppc: constify snd_pcm_ops structures [PATCH 10/13] ALSA: sh: constify snd_pcm_ops structures [PATCH 11/13] ALSA: sparc: constify snd_pcm_ops structures [PATCH 12/13] ALSA: spi: constify snd_pcm_ops structures [PATCH 13/13] ALSA: usb: constify snd_pcm_ops structures
sound/aoa/soundbus/i2sbus/pcm.c | 4 +- sound/arm/aaci.c | 4 +- sound/arm/pxa2xx-pcm.c | 2 +- sound/atmel/ac97c.c | 4 +- sound/drivers/aloop.c | 4 +- sound/drivers/ml403-ac97cr.c | 4 +- sound/firewire/isight.c | 2 +- sound/firewire/motu/motu-pcm.c | 4 +- sound/mips/hal2.c | 4 +- sound/mips/sgio2audio.c | 6 +- sound/parisc/harmony.c | 4 +- sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | 2 +- sound/ppc/pmac.c | 4 +- sound/ppc/snd_ps3.c | 2 +- sound/sh/aica.c | 2 +- sound/sh/sh_dac_audio.c | 2 +- sound/sparc/amd7930.c | 4 +- sound/sparc/cs4231.c | 4 +- sound/sparc/dbri.c | 2 +- sound/spi/at73c213.c | 2 +- sound/usb/6fire/pcm.c | 2 +- sound/usb/caiaq/audio.c | 2 +- sound/usb/hiface/pcm.c | 2 +- sound/usb/misc/ua101.c | 4 +- sound/usb/pcm.c | 4 +- sound/usb/usx2y/usbusx2yaudio.c | 2 +- sound/usb/usx2y/usx2yhwdeppcm.c | 2 +- 27 files changed, 42 insertions(+), 42 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/13 ALSA: aoa: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/aoa/soundbus/i2sbus/pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/aoa/soundbus/i2sbus/pcm.c +2 -2
@@ -778,7 +778,7 @@ static snd_pcm_uframes_t i2sbus_playback_pointer(struct snd_pcm_substreamreturn i2sbus_pcm_pointer (i2sdev,0 ); } -static struct snd_pcm_ops i2sbus_playback_ops = { +static const struct snd_pcm_ops i2sbus_playback_ops = { .open = i2sbus_playback_open, .close = i2sbus_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -848,7 +848,7 @@ static snd_pcm_uframes_t i2sbus_record_pointer(struct snd_pcm_substreamreturn i2sbus_pcm_pointer (i2sdev,1 ); } -static struct snd_pcm_ops i2sbus_record_ops = { +static const struct snd_pcm_ops i2sbus_record_ops = { .open = i2sbus_record_open, .close = i2sbus_record_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 2/13 ALSA: arm: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/arm/aaci.c | 4 ++-- sound/arm/pxa2xx-pcm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/arm/aaci.c +2 -2
@@ -635,7 +635,7 @@ static int aaci_pcm_playback_trigger(struct snd_pcm_substream *substream, int cmreturn ret; } -static struct snd_pcm_ops aaci_playback_ops = { +static const struct snd_pcm_ops aaci_playback_ops = { .open = aaci_pcm_open, .close = aaci_pcm_close, .ioctl = snd_pcm_lib_ioctl,
@@ -738,7 +738,7 @@ static int aaci_pcm_capture_prepare(struct snd_pcm_substream *substream)return 0 ; } -static struct snd_pcm_ops aaci_capture_ops = { +static const struct snd_pcm_ops aaci_capture_ops = { .open = aaci_pcm_open, .close = aaci_pcm_close, .ioctl = snd_pcm_lib_ioctl,
sound/arm/pxa2xx-pcm.c +1 -1
@@ -68,7 +68,7 @@ static int pxa2xx_pcm_close(struct snd_pcm_substream *substream)return __pxa2xx_pcm_close (substream); } -static struct snd_pcm_ops pxa2xx_pcm_ops = { +static const struct snd_pcm_ops pxa2xx_pcm_ops = { .open = pxa2xx_pcm_open, .close = pxa2xx_pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 3/13 ALSA: atmel: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/atmel/ac97c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/atmel/ac97c.c +2 -2
@@ -461,7 +461,7 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream)return frames; } -static struct snd_pcm_ops atmel_ac97_playback_ops = { +static const struct snd_pcm_ops atmel_ac97_playback_ops = { .open = atmel_ac97c_playback_open, .close = atmel_ac97c_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -472,7 +472,7 @@ static int atmel_ac97c_capture_prepare(struct snd_pcm_substream *substream) .pointer = atmel_ac97c_playback_pointer, }; -static struct snd_pcm_ops atmel_ac97_capture_ops = { +static const struct snd_pcm_ops atmel_ac97_capture_ops = { .open = atmel_ac97c_capture_open, .close = atmel_ac97c_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 4/13 ALSA: drivers: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/drivers/aloop.c | 4 ++-- sound/drivers/ml403-ac97cr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
sound/drivers/aloop.c +2 -2
@@ -750,7 +750,7 @@ static int loopback_close(struct snd_pcm_substream *substream)return 0 ; } -static struct snd_pcm_ops loopback_playback_ops = { +static const struct snd_pcm_ops loopback_playback_ops = { .open = loopback_open, .close = loopback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -763,7 +763,7 @@ static int loopback_close(struct snd_pcm_substream *substream) .mmap = snd_pcm_lib_mmap_vmalloc, }; -static struct snd_pcm_ops loopback_capture_ops = { +static const struct snd_pcm_ops loopback_capture_ops = { .open = loopback_open, .close = loopback_close, .ioctl = snd_pcm_lib_ioctl,
sound/drivers/ml403-ac97cr.c +2 -2
@@ -759,7 +759,7 @@ static int snd_ml403_ac97cr_capture_close(struct snd_pcm_substream *substream)return 0 ; } -static struct snd_pcm_ops snd_ml403_ac97cr_playback_ops = { +static const struct snd_pcm_ops snd_ml403_ac97cr_playback_ops = { .open = snd_ml403_ac97cr_playback_open, .close = snd_ml403_ac97cr_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -770,7 +770,7 @@ static int snd_ml403_ac97cr_capture_close(struct snd_pcm_substream *substream) .pointer = snd_ml403_ac97cr_pcm_pointer, }; -static struct snd_pcm_ops snd_ml403_ac97cr_capture_ops = { +static const struct snd_pcm_ops snd_ml403_ac97cr_capture_ops = { .open = snd_ml403_ac97cr_capture_open, .close = snd_ml403_ac97cr_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 5/13 ALSA: firewire: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/firewire/isight.c | 2 +- sound/firewire/motu/motu-pcm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/firewire/isight.c +1 -1
@@ -444,7 +444,7 @@ static snd_pcm_uframes_t isight_pointer(struct snd_pcm_substream *substream)static int isight_create_pcm (struct isight *isight) { -static struct snd_pcm_ops ops = { +static const struct snd_pcm_ops ops = { .open = isight_open, .close = isight_close, .ioctl = snd_pcm_lib_ioctl,
sound/firewire/motu/motu-pcm.c +2 -2
@@ -352,7 +352,7 @@ static int playback_ack(struct snd_pcm_substream *substream)int snd_motu_create_pcm_devices (struct snd_motu *motu) { -static struct snd_pcm_ops capture_ops = { +static const struct snd_pcm_ops capture_ops = { .open = pcm_open, .close = pcm_close, .ioctl = snd_pcm_lib_ioctl,
@@ -365,7 +365,7 @@ int snd_motu_create_pcm_devices(struct snd_motu *motu) .page = snd_pcm_lib_get_vmalloc_page, .mmap = snd_pcm_lib_mmap_vmalloc, }; -static struct snd_pcm_ops playback_ops = { +static const struct snd_pcm_ops playback_ops = { .open = pcm_open, .close = pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 6/13 ALSA: mips: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/mips/hal2.c | 4 ++-- sound/mips/sgio2audio.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
sound/mips/hal2.c +2 -2
@@ -711,7 +711,7 @@ static int hal2_capture_ack(struct snd_pcm_substream *substream) hal2_capture_transfer); } -static struct snd_pcm_ops hal2_playback_ops = { +static const struct snd_pcm_ops hal2_playback_ops = { .open = hal2_playback_open, .close = hal2_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -723,7 +723,7 @@ static int hal2_capture_ack(struct snd_pcm_substream *substream) .ack = hal2_playback_ack, }; -static struct snd_pcm_ops hal2_capture_ops = { +static const struct snd_pcm_ops hal2_capture_ops = { .open = hal2_capture_open, .close = hal2_capture_close, .ioctl = snd_pcm_lib_ioctl,
sound/mips/sgio2audio.c +3 -3
@@ -675,7 +675,7 @@ static int snd_sgio2audio_pcm_trigger(struct snd_pcm_substream *substream, }/* operators */ -static struct snd_pcm_ops snd_sgio2audio_playback1_ops = { +static const struct snd_pcm_ops snd_sgio2audio_playback1_ops = { .open = snd_sgio2audio_playback1_open, .close = snd_sgio2audio_pcm_close, .ioctl = snd_pcm_lib_ioctl,
@@ -688,7 +688,7 @@ static int snd_sgio2audio_pcm_trigger(struct snd_pcm_substream *substream, .mmap = snd_pcm_lib_mmap_vmalloc, }; -static struct snd_pcm_ops snd_sgio2audio_playback2_ops = { +static const struct snd_pcm_ops snd_sgio2audio_playback2_ops = { .open = snd_sgio2audio_playback2_open, .close = snd_sgio2audio_pcm_close, .ioctl = snd_pcm_lib_ioctl,
@@ -701,7 +701,7 @@ static int snd_sgio2audio_pcm_trigger(struct snd_pcm_substream *substream, .mmap = snd_pcm_lib_mmap_vmalloc, }; -static struct snd_pcm_ops snd_sgio2audio_capture_ops = { +static const struct snd_pcm_ops snd_sgio2audio_capture_ops = { .open = snd_sgio2audio_capture_open, .close = snd_sgio2audio_pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 7/13 ALSA: parisc: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/parisc/harmony.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/parisc/harmony.c +2 -2
@@ -596,7 +596,7 @@return snd_pcm_lib_free_pages (ss); } -static struct snd_pcm_ops snd_harmony_playback_ops = { +static const struct snd_pcm_ops snd_harmony_playback_ops = { .open = snd_harmony_playback_open, .close = snd_harmony_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -607,7 +607,7 @@ .pointer = snd_harmony_playback_pointer, }; -static struct snd_pcm_ops snd_harmony_capture_ops = { +static const struct snd_pcm_ops snd_harmony_capture_ops = { .open = snd_harmony_capture_open, .close = snd_harmony_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 8/13 ALSA: pcmcia: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c +1 -1
@@ -266,7 +266,7 @@ static snd_pcm_uframes_t pdacf_pcm_capture_pointer(struct snd_pcm_substream *sub/* * operators for PCM capture */ -static struct snd_pcm_ops pdacf_pcm_capture_ops = { +static const struct snd_pcm_ops pdacf_pcm_capture_ops = { .open = pdacf_pcm_capture_open, .close = pdacf_pcm_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 9/13 ALSA: ppc: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/ppc/pmac.c | 4 ++-- sound/ppc/snd_ps3.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
sound/ppc/pmac.c +2 -2
@@ -681,7 +681,7 @@ static int snd_pmac_capture_close(struct snd_pcm_substream *subs)/* */ -static struct snd_pcm_ops snd_pmac_playback_ops = { +static const struct snd_pcm_ops snd_pmac_playback_ops = { .open = snd_pmac_playback_open, .close = snd_pmac_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -692,7 +692,7 @@ static int snd_pmac_capture_close(struct snd_pcm_substream *subs) .pointer = snd_pmac_playback_pointer, }; -static struct snd_pcm_ops snd_pmac_capture_ops = { +static const struct snd_pcm_ops snd_pmac_capture_ops = { .open = snd_pmac_capture_open, .close = snd_pmac_capture_close, .ioctl = snd_pcm_lib_ioctl,
sound/ppc/snd_ps3.c +1 -1
@@ -772,7 +772,7 @@ static int snd_ps3_spdif_default_put(struct snd_kcontrol *kcontrol, }, }; -static struct snd_pcm_ops snd_ps3_pcm_spdif_ops = { +static const struct snd_pcm_ops snd_ps3_pcm_spdif_ops = { .open = snd_ps3_pcm_open, .close = snd_ps3_pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 10/13 ALSA: sh: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/sh/aica.c | 2 +- sound/sh/sh_dac_audio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
sound/sh/aica.c +1 -1
@@ -436,7 +436,7 @@ static unsigned long snd_aicapcm_pcm_pointer(struct snd_pcm_substreamreturn readl (AICA_CONTROL_CHANNEL_SAMPLE_NUMBER ); } -static struct snd_pcm_ops snd_aicapcm_playback_ops = { +static const struct snd_pcm_ops snd_aicapcm_playback_ops = { .open = snd_aicapcm_pcm_open, .close = snd_aicapcm_pcm_close, .ioctl = snd_pcm_lib_ioctl,
sound/sh/sh_dac_audio.c +1 -1
@@ -252,7 +252,7 @@ snd_pcm_uframes_t snd_sh_dac_pcm_pointer(struct snd_pcm_substream *substream) }/* pcm ops */ -static struct snd_pcm_ops snd_sh_dac_pcm_ops = { +static const struct snd_pcm_ops snd_sh_dac_pcm_ops = { .open = snd_sh_dac_pcm_open, .close = snd_sh_dac_pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 11/13 ALSA: sparc: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/sparc/amd7930.c | 4 ++-- sound/sparc/cs4231.c | 4 ++-- sound/sparc/dbri.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
sound/sparc/amd7930.c +2 -2
@@ -733,7 +733,7 @@ static int snd_amd7930_hw_free(struct snd_pcm_substream *substream)return snd_pcm_lib_free_pages (substream); } -static struct snd_pcm_ops snd_amd7930_playback_ops = { +static const struct snd_pcm_ops snd_amd7930_playback_ops = { .open = snd_amd7930_playback_open, .close = snd_amd7930_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -744,7 +744,7 @@ static int snd_amd7930_hw_free(struct snd_pcm_substream *substream) .pointer = snd_amd7930_playback_pointer, }; -static struct snd_pcm_ops snd_amd7930_capture_ops = { +static const struct snd_pcm_ops snd_amd7930_capture_ops = { .open = snd_amd7930_capture_open, .close = snd_amd7930_capture_close, .ioctl = snd_pcm_lib_ioctl,
sound/sparc/cs4231.c +2 -2
@@ -1203,7 +1203,7 @@ static int snd_cs4231_capture_close(struct snd_pcm_substream *substream)* XXX the audio AUXIO register... */ -static struct snd_pcm_ops snd_cs4231_playback_ops = { +static const struct snd_pcm_ops snd_cs4231_playback_ops = { .open = snd_cs4231_playback_open, .close = snd_cs4231_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -1214,7 +1214,7 @@ static int snd_cs4231_capture_close(struct snd_pcm_substream *substream) .pointer = snd_cs4231_playback_pointer, }; -static struct snd_pcm_ops snd_cs4231_capture_ops = { +static const struct snd_pcm_ops snd_cs4231_capture_ops = { .open = snd_cs4231_capture_open, .close = snd_cs4231_capture_close, .ioctl = snd_pcm_lib_ioctl,
sound/sparc/dbri.c +1 -1
@@ -2213,7 +2213,7 @@ static snd_pcm_uframes_t snd_dbri_pointer(struct snd_pcm_substream *substream)return ret; } -static struct snd_pcm_ops snd_dbri_ops = { +static const struct snd_pcm_ops snd_dbri_ops = { .open = snd_dbri_open, .close = snd_dbri_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 12/13 ALSA: spi: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/spi/at73c213.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/spi/at73c213.c +1 -1
@@ -322,7 +322,7 @@ static int snd_at73c213_pcm_trigger(struct snd_pcm_substream *substream,return pos; } -static struct snd_pcm_ops at73c213_playback_ops = { +static const struct snd_pcm_ops at73c213_playback_ops = { .open = snd_at73c213_pcm_open, .close = snd_at73c213_pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 13/13 ALSA: usb: constify snd_pcm_ops structures
In reply to Arvind Yadavsnd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const.
--- sound/usb/6fire/pcm.c | 2 +- sound/usb/caiaq/audio.c | 2 +- sound/usb/hiface/pcm.c | 2 +- sound/usb/misc/ua101.c | 4 ++-- sound/usb/pcm.c | 4 ++-- sound/usb/usx2y/usbusx2yaudio.c | 2 +- sound/usb/usx2y/usx2yhwdeppcm.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-)
sound/usb/6fire/pcm.c +1 -1
@@ -555,7 +555,7 @@ static snd_pcm_uframes_t usb6fire_pcm_pointer(return ret; } -static struct snd_pcm_ops pcm_ops = { +static const struct snd_pcm_ops pcm_ops = { .open = usb6fire_pcm_open, .close = usb6fire_pcm_close, .ioctl = snd_pcm_lib_ioctl,
sound/usb/caiaq/audio.c +1 -1
@@ -338,7 +338,7 @@ static int snd_usb_caiaq_pcm_trigger(struct snd_pcm_substream *sub, int cmd) }/* operators for both playback and capture */ -static struct snd_pcm_ops snd_usb_caiaq_ops = { +static const struct snd_pcm_ops snd_usb_caiaq_ops = { .open = snd_usb_caiaq_substream_open, .close = snd_usb_caiaq_substream_close, .ioctl = snd_pcm_lib_ioctl,
sound/usb/hiface/pcm.c +1 -1
@@ -513,7 +513,7 @@ static snd_pcm_uframes_t hiface_pcm_pointer(struct snd_pcm_substream *alsa_sub)return bytes_to_frames (alsa_sub->runtime, dma_offset); } -static struct snd_pcm_ops pcm_ops = { +static const struct snd_pcm_ops pcm_ops = { .open = hiface_pcm_open, .close = hiface_pcm_close, .ioctl = snd_pcm_lib_ioctl,
sound/usb/misc/ua101.c +2 -2
@@ -890,7 +890,7 @@ static snd_pcm_uframes_t playback_pcm_pointer(struct snd_pcm_substream *subs)return ua101_pcm_pointer (ua, &ua->playback); } -static struct snd_pcm_ops capture_pcm_ops = { +static const struct snd_pcm_ops capture_pcm_ops = { .open = capture_pcm_open, .close = capture_pcm_close, .ioctl = snd_pcm_lib_ioctl,
@@ -903,7 +903,7 @@ static snd_pcm_uframes_t playback_pcm_pointer(struct snd_pcm_substream *subs) .mmap = snd_pcm_lib_mmap_vmalloc, }; -static struct snd_pcm_ops playback_pcm_ops = { +static const struct snd_pcm_ops playback_pcm_ops = { .open = playback_pcm_open, .close = playback_pcm_close, .ioctl = snd_pcm_lib_ioctl,
sound/usb/pcm.c +2 -2
@@ -1690,7 +1690,7 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substreamreturn -EINVAL ; } -static struct snd_pcm_ops snd_usb_playback_ops = { +static const struct snd_pcm_ops snd_usb_playback_ops = { .open = snd_usb_playback_open, .close = snd_usb_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -1703,7 +1703,7 @@ static int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream .mmap = snd_pcm_lib_mmap_vmalloc, }; -static struct snd_pcm_ops snd_usb_capture_ops = { +static const struct snd_pcm_ops snd_usb_capture_ops = { .open = snd_usb_capture_open, .close = snd_usb_capture_close, .ioctl = snd_pcm_lib_ioctl,
sound/usb/usx2y/usbusx2yaudio.c +1 -1
@@ -907,7 +907,7 @@ static int snd_usX2Y_pcm_close(struct snd_pcm_substream *substream) } -static struct snd_pcm_ops snd_usX2Y_pcm_ops = +static const struct snd_pcm_ops snd_usX2Y_pcm_ops = { .open = snd_usX2Y_pcm_open, .close = snd_usX2Y_pcm_close,
sound/usb/usx2y/usx2yhwdeppcm.c +1 -1
@@ -587,7 +587,7 @@ static int snd_usX2Y_usbpcm_close(struct snd_pcm_substream *substream) } -static struct snd_pcm_ops snd_usX2Y_usbpcm_ops = +static const struct snd_pcm_ops snd_usX2Y_usbpcm_ops = { .open = snd_usX2Y_usbpcm_open, .close = snd_usX2Y_usbpcm_close,
Signature · 1 line
1.9.1
Takashi Iwai
AppliedQuoted 5 lines · Arvind Yadav
snd_pcm_opsare not supposed to change at runtime. All functions working withsnd_pcm_opsprovided by <sound/pcm.h> work with constsnd_pcm_ops. So mark the non-const structs as const.
Quoted 14 lines
Arvind Yadav (13):
[PATCH 01/13] ALSA: aoa: constifysnd_pcm_opsstructures [PATCH 02/13] ALSA: arm: constifysnd_pcm_opsstructures [PATCH 03/13] ALSA: atmel: constifysnd_pcm_opsstructures [PATCH 04/13] ALSA: drivers: constifysnd_pcm_opsstructures [PATCH 05/13] ALSA: firewire: constifysnd_pcm_opsstructures [PATCH 06/13] ALSA: mips: constifysnd_pcm_opsstructures [PATCH 07/13] ALSA: parisc: constifysnd_pcm_opsstructures [PATCH 08/13] ALSA: pcmcia: constifysnd_pcm_opsstructures [PATCH 09/13] ALSA: ppc: constifysnd_pcm_opsstructures [PATCH 10/13] ALSA: sh: constifysnd_pcm_opsstructures [PATCH 11/13] ALSA: sparc: constifysnd_pcm_opsstructures [PATCH 12/13] ALSA: spi: constifysnd_pcm_opsstructures [PATCH 13/13] ALSA: usb: constifysnd_pcm_opsstructures
Applied all patches. Thanks.
Takashi