summaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-06-07 08:16:34 -0400
committerTakashi Iwai <tiwai@suse.de>2017-06-09 04:42:48 -0400
commitb078bbfbb1a1083a69117bc894107cad6920a2ed (patch)
tree6e609b592cc763f6e0ae58e17736c76cbc231221 /sound/isa
parentbfa516a109ae77dae34b69f36d09b8f9d329384b (diff)
ALSA: sb: Constify hw_constraints
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/sb/sb8_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index 9043397fe62f..0f302be4fb6d 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -46,19 +46,19 @@ MODULE_LICENSE("GPL");
46#define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v)) 46#define SB8_DEN(v) ((SB8_CLOCK + (v) / 2) / (v))
47#define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v)) 47#define SB8_RATE(v) (SB8_CLOCK / SB8_DEN(v))
48 48
49static struct snd_ratnum clock = { 49static const struct snd_ratnum clock = {
50 .num = SB8_CLOCK, 50 .num = SB8_CLOCK,
51 .den_min = 1, 51 .den_min = 1,
52 .den_max = 256, 52 .den_max = 256,
53 .den_step = 1, 53 .den_step = 1,
54}; 54};
55 55
56static struct snd_pcm_hw_constraint_ratnums hw_constraints_clock = { 56static const struct snd_pcm_hw_constraint_ratnums hw_constraints_clock = {
57 .nrats = 1, 57 .nrats = 1,
58 .rats = &clock, 58 .rats = &clock,
59}; 59};
60 60
61static struct snd_ratnum stereo_clocks[] = { 61static const struct snd_ratnum stereo_clocks[] = {
62 { 62 {
63 .num = SB8_CLOCK, 63 .num = SB8_CLOCK,
64 .den_min = SB8_DEN(22050), 64 .den_min = SB8_DEN(22050),