constify isa snd_pcm_ops structures
cover constify isa 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 (9):
[PATCH 1/9] ALSA: ad1816a: constify snd_pcm_ops structures [PATCH 2/9] ALSA: es1688: constify snd_pcm_ops structures [PATCH 3/9] ALSA: es18xx: constify snd_pcm_ops structures [PATCH 4/9] ALSA: gus: constify snd_pcm_ops structures [PATCH 5/9] ALSA: msnd: constify snd_pcm_ops structures [PATCH 6/9] ALSA: emu8000: constify snd_pcm_ops structures [PATCH 7/9] ALSA: sb16: constify snd_pcm_ops structures [PATCH 8/9] ALSA: sb8: constify snd_pcm_ops structures [PATCH 9/9] ALSA: wss: constify snd_pcm_ops structures
sound/isa/ad1816a/ad1816a_lib.c | 4 ++-- sound/isa/es1688/es1688_lib.c | 4 ++-- sound/isa/es18xx.c | 4 ++-- sound/isa/gus/gus_pcm.c | 4 ++-- sound/isa/msnd/msnd.c | 4 ++-- sound/isa/sb/emu8000_pcm.c | 2 +- sound/isa/sb/sb16_main.c | 4 ++-- sound/isa/sb/sb8_main.c | 4 ++-- sound/isa/wss/wss_lib.c | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/9 ALSA: ad1816a: 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/isa/ad1816a/ad1816a_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/ad1816a/ad1816a_lib.c +2 -2
@@ -653,7 +653,7 @@ int snd_ad1816a_create(struct snd_card *card,return 0 ; } -static struct snd_pcm_ops snd_ad1816a_playback_ops = { +static const struct snd_pcm_ops snd_ad1816a_playback_ops = { .open = snd_ad1816a_playback_open, .close = snd_ad1816a_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -664,7 +664,7 @@ int snd_ad1816a_create(struct snd_card *card, .pointer = snd_ad1816a_playback_pointer, }; -static struct snd_pcm_ops snd_ad1816a_capture_ops = { +static const struct snd_pcm_ops snd_ad1816a_capture_ops = { .open = snd_ad1816a_capture_open, .close = snd_ad1816a_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 3/9 ALSA: es18xx: 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/isa/es18xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/es18xx.c +2 -2
@@ -1665,7 +1665,7 @@ static int snd_es18xx_probe(struct snd_es18xx *chip,return snd_es18xx_initialize (chip, mpu_port, fm_port); } -static struct snd_pcm_ops snd_es18xx_playback_ops = { +static const struct snd_pcm_ops snd_es18xx_playback_ops = { .open = snd_es18xx_playback_open, .close = snd_es18xx_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -1676,7 +1676,7 @@ static int snd_es18xx_probe(struct snd_es18xx *chip, .pointer = snd_es18xx_playback_pointer, }; -static struct snd_pcm_ops snd_es18xx_capture_ops = { +static const struct snd_pcm_ops snd_es18xx_capture_ops = { .open = snd_es18xx_capture_open, .close = snd_es18xx_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 5/9 ALSA: msnd: 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/isa/msnd/msnd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/msnd/msnd.c +2 -2
@@ -572,7 +572,7 @@ static int snd_msnd_playback_trigger(struct snd_pcm_substream *substream, } -static struct snd_pcm_ops snd_msnd_playback_ops = { +static const struct snd_pcm_ops snd_msnd_playback_ops = { .open = snd_msnd_playback_open, .close = snd_msnd_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -669,7 +669,7 @@ static int snd_msnd_capture_hw_params(struct snd_pcm_substream *substream, } -static struct snd_pcm_ops snd_msnd_capture_ops = { +static const struct snd_pcm_ops snd_msnd_capture_ops = { .open = snd_msnd_capture_open, .close = snd_msnd_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 6/9 ALSA: emu8000: 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/isa/sb/emu8000_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/isa/sb/emu8000_pcm.c +1 -1
@@ -670,7 +670,7 @@ static snd_pcm_uframes_t emu8k_pcm_pointer(struct snd_pcm_substream *subs) } -static struct snd_pcm_ops emu8k_pcm_ops = { +static const struct snd_pcm_ops emu8k_pcm_ops = { .open = emu8k_pcm_open, .close = emu8k_pcm_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 7/9 ALSA: sb16: 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/isa/sb/sb16_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/sb/sb16_main.c +2 -2
@@ -838,7 +838,7 @@ int snd_sb16dsp_configure(struct snd_sb * chip)return 0 ; } -static struct snd_pcm_ops snd_sb16_playback_ops = { +static const struct snd_pcm_ops snd_sb16_playback_ops = { .open = snd_sb16_playback_open, .close = snd_sb16_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -849,7 +849,7 @@ int snd_sb16dsp_configure(struct snd_sb * chip) .pointer = snd_sb16_playback_pointer, }; -static struct snd_pcm_ops snd_sb16_capture_ops = { +static const struct snd_pcm_ops snd_sb16_capture_ops = { .open = snd_sb16_capture_open, .close = snd_sb16_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 8/9 ALSA: sb8: 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/isa/sb/sb8_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/sb/sb8_main.c +2 -2
@@ -572,7 +572,7 @@ static int snd_sb8_close(struct snd_pcm_substream *substream)* Initialization part */ -static struct snd_pcm_ops snd_sb8_playback_ops = { +static const struct snd_pcm_ops snd_sb8_playback_ops = { .open = snd_sb8_open, .close = snd_sb8_close, .ioctl = snd_pcm_lib_ioctl,
@@ -583,7 +583,7 @@ static int snd_sb8_close(struct snd_pcm_substream *substream) .pointer = snd_sb8_playback_pointer, }; -static struct snd_pcm_ops snd_sb8_capture_ops = { +static const struct snd_pcm_ops snd_sb8_capture_ops = { .open = snd_sb8_open, .close = snd_sb8_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 9/9 ALSA: wss: 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/isa/wss/wss_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/wss/wss_lib.c +2 -2
@@ -1901,7 +1901,7 @@ int snd_wss_create(struct snd_card *card, }EXPORT_SYMBOL (snd_wss_create); -static struct snd_pcm_ops snd_wss_playback_ops = { +static const struct snd_pcm_ops snd_wss_playback_ops = { .open = snd_wss_playback_open, .close = snd_wss_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -1912,7 +1912,7 @@ int snd_wss_create(struct snd_card *card, .pointer = snd_wss_playback_pointer, }; -static struct snd_pcm_ops snd_wss_capture_ops = { +static const struct snd_pcm_ops snd_wss_capture_ops = { .open = snd_wss_capture_open, .close = snd_wss_capture_close, .ioctl = snd_pcm_lib_ioctl,
Signature · 1 line
1.9.1
PATCH 2/9 ALSA: es1688: 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/isa/es1688/es1688_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/es1688/es1688_lib.c +2 -2
@@ -706,7 +706,7 @@ int snd_es1688_create(struct snd_card *card,return err; } -static struct snd_pcm_ops snd_es1688_playback_ops = { +static const struct snd_pcm_ops snd_es1688_playback_ops = { .open = snd_es1688_playback_open, .close = snd_es1688_playback_close, .ioctl = snd_es1688_ioctl,
@@ -717,7 +717,7 @@ int snd_es1688_create(struct snd_card *card, .pointer = snd_es1688_playback_pointer, }; -static struct snd_pcm_ops snd_es1688_capture_ops = { +static const struct snd_pcm_ops snd_es1688_capture_ops = { .open = snd_es1688_capture_open, .close = snd_es1688_capture_close, .ioctl = snd_es1688_ioctl,
Signature · 1 line
1.9.1
PATCH 4/9 ALSA: gus: 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/isa/gus/gus_pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/isa/gus/gus_pcm.c +2 -2
@@ -842,7 +842,7 @@ static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ .put = snd_gf1_pcm_volume_put }; -static struct snd_pcm_ops snd_gf1_pcm_playback_ops = { +static const struct snd_pcm_ops snd_gf1_pcm_playback_ops = { .open = snd_gf1_pcm_playback_open, .close = snd_gf1_pcm_playback_close, .ioctl = snd_pcm_lib_ioctl,
@@ -856,7 +856,7 @@ static int snd_gf1_pcm_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_ .fill_silence = snd_gf1_pcm_playback_silence, }; -static struct snd_pcm_ops snd_gf1_pcm_capture_ops = { +static const struct snd_pcm_ops snd_gf1_pcm_capture_ops = { .open = snd_gf1_pcm_capture_open, .close = snd_gf1_pcm_capture_close, .ioctl = snd_pcm_lib_ioctl,
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 10 lines
Arvind Yadav (9):
[PATCH 1/9] ALSA: ad1816a: constifysnd_pcm_opsstructures [PATCH 2/9] ALSA: es1688: constifysnd_pcm_opsstructures [PATCH 3/9] ALSA: es18xx: constifysnd_pcm_opsstructures [PATCH 4/9] ALSA: gus: constifysnd_pcm_opsstructures [PATCH 5/9] ALSA: msnd: constifysnd_pcm_opsstructures [PATCH 6/9] ALSA: emu8000: constifysnd_pcm_opsstructures [PATCH 7/9] ALSA: sb16: constifysnd_pcm_opsstructures [PATCH 8/9] ALSA: sb8: constifysnd_pcm_opsstructures [PATCH 9/9] ALSA: wss: constifysnd_pcm_opsstructures
Applied all 9 patches. Thanks.
Takashi