summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-04 13:49:30 -0400
committerTakashi Iwai <tiwai@suse.de>2017-08-06 16:16:59 -0400
commit3135432e429ef9b69f75ad06e81071e648753a26 (patch)
tree2a06ba13e531b21dc65e4479c0327ca1129b16cf
parent4647e8d512224265afad63aa27a6b22561f50d46 (diff)
ALSA: ice1712: add const to snd_akm4xxx structures
Declare snd_akm4xxx structures as const as they are only passed to the function snd_ice1712_akm4xxx_init. This argument is of type const, so make the structures const. Done using Coccinelle: @match disable optional_qualifier@ identifier s; position p; @@ static struct snd_akm4xxx s@p={...}; @good1@ identifier match.s; position p; @@ snd_ice1712_akm4xxx_init(...,&s@p,...) @bad@ identifier match.s; position p!={match.p,good1.p}; @@ s@p @depends on !bad disable optional_qualifier@ identifier match.s; @@ static +const struct snd_akm4xxx s={...}; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ice1712/delta.c12
-rw-r--r--sound/pci/ice1712/ews.c6
-rw-r--r--sound/pci/ice1712/hoontech.c2
-rw-r--r--sound/pci/ice1712/juli.c2
-rw-r--r--sound/pci/ice1712/phase.c2
-rw-r--r--sound/pci/ice1712/quartet.c2
-rw-r--r--sound/pci/ice1712/revo.c10
7 files changed, 18 insertions, 18 deletions
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c
index 4e470f09e215..6808bed0105e 100644
--- a/sound/pci/ice1712/delta.c
+++ b/sound/pci/ice1712/delta.c
@@ -445,7 +445,7 @@ static const struct snd_kcontrol_new snd_ice1712_delta1010lt_wordclock_status =
445 * initialize the chips on M-Audio cards 445 * initialize the chips on M-Audio cards
446 */ 446 */
447 447
448static struct snd_akm4xxx akm_audiophile = { 448static const struct snd_akm4xxx akm_audiophile = {
449 .type = SND_AK4528, 449 .type = SND_AK4528,
450 .num_adcs = 2, 450 .num_adcs = 2,
451 .num_dacs = 2, 451 .num_dacs = 2,
@@ -466,7 +466,7 @@ static const struct snd_ak4xxx_private akm_audiophile_priv = {
466 .mask_flags = 0, 466 .mask_flags = 0,
467}; 467};
468 468
469static struct snd_akm4xxx akm_delta410 = { 469static const struct snd_akm4xxx akm_delta410 = {
470 .type = SND_AK4529, 470 .type = SND_AK4529,
471 .num_adcs = 2, 471 .num_adcs = 2,
472 .num_dacs = 8, 472 .num_dacs = 8,
@@ -487,7 +487,7 @@ static const struct snd_ak4xxx_private akm_delta410_priv = {
487 .mask_flags = 0, 487 .mask_flags = 0,
488}; 488};
489 489
490static struct snd_akm4xxx akm_delta1010lt = { 490static const struct snd_akm4xxx akm_delta1010lt = {
491 .type = SND_AK4524, 491 .type = SND_AK4524,
492 .num_adcs = 8, 492 .num_adcs = 8,
493 .num_dacs = 8, 493 .num_dacs = 8,
@@ -509,7 +509,7 @@ static const struct snd_ak4xxx_private akm_delta1010lt_priv = {
509 .mask_flags = 0, 509 .mask_flags = 0,
510}; 510};
511 511
512static struct snd_akm4xxx akm_delta66e = { 512static const struct snd_akm4xxx akm_delta66e = {
513 .type = SND_AK4524, 513 .type = SND_AK4524,
514 .num_adcs = 4, 514 .num_adcs = 4,
515 .num_dacs = 4, 515 .num_dacs = 4,
@@ -532,7 +532,7 @@ static const struct snd_ak4xxx_private akm_delta66e_priv = {
532}; 532};
533 533
534 534
535static struct snd_akm4xxx akm_delta44 = { 535static const struct snd_akm4xxx akm_delta44 = {
536 .type = SND_AK4524, 536 .type = SND_AK4524,
537 .num_adcs = 4, 537 .num_adcs = 4,
538 .num_dacs = 4, 538 .num_dacs = 4,
@@ -554,7 +554,7 @@ static const struct snd_ak4xxx_private akm_delta44_priv = {
554 .mask_flags = 0, 554 .mask_flags = 0,
555}; 555};
556 556
557static struct snd_akm4xxx akm_vx442 = { 557static const struct snd_akm4xxx akm_vx442 = {
558 .type = SND_AK4524, 558 .type = SND_AK4524,
559 .num_adcs = 4, 559 .num_adcs = 4,
560 .num_dacs = 4, 560 .num_dacs = 4,
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c
index 5bc14e8806a7..b8af747ecb43 100644
--- a/sound/pci/ice1712/ews.c
+++ b/sound/pci/ice1712/ews.c
@@ -344,7 +344,7 @@ static void ews88_setup_spdif(struct snd_ice1712 *ice, int rate)
344 344
345/* 345/*
346 */ 346 */
347static struct snd_akm4xxx akm_ews88mt = { 347static const struct snd_akm4xxx akm_ews88mt = {
348 .num_adcs = 8, 348 .num_adcs = 8,
349 .num_dacs = 8, 349 .num_dacs = 8,
350 .type = SND_AK4524, 350 .type = SND_AK4524,
@@ -366,7 +366,7 @@ static const struct snd_ak4xxx_private akm_ews88mt_priv = {
366 .mask_flags = 0, 366 .mask_flags = 0,
367}; 367};
368 368
369static struct snd_akm4xxx akm_ewx2496 = { 369static const struct snd_akm4xxx akm_ewx2496 = {
370 .num_adcs = 2, 370 .num_adcs = 2,
371 .num_dacs = 2, 371 .num_dacs = 2,
372 .type = SND_AK4524, 372 .type = SND_AK4524,
@@ -387,7 +387,7 @@ static const struct snd_ak4xxx_private akm_ewx2496_priv = {
387 .mask_flags = 0, 387 .mask_flags = 0,
388}; 388};
389 389
390static struct snd_akm4xxx akm_6fire = { 390static const struct snd_akm4xxx akm_6fire = {
391 .num_adcs = 6, 391 .num_adcs = 6,
392 .num_dacs = 6, 392 .num_dacs = 6,
393 .type = SND_AK4524, 393 .type = SND_AK4524,
diff --git a/sound/pci/ice1712/hoontech.c b/sound/pci/ice1712/hoontech.c
index de2fcc9a983e..f37ed0bc203d 100644
--- a/sound/pci/ice1712/hoontech.c
+++ b/sound/pci/ice1712/hoontech.c
@@ -269,7 +269,7 @@ static void stdsp24_ak4524_lock(struct snd_akm4xxx *ak, int chip)
269static int snd_ice1712_value_init(struct snd_ice1712 *ice) 269static int snd_ice1712_value_init(struct snd_ice1712 *ice)
270{ 270{
271 /* Hoontech STDSP24 with modified hardware */ 271 /* Hoontech STDSP24 with modified hardware */
272 static struct snd_akm4xxx akm_stdsp24_mv = { 272 static const struct snd_akm4xxx akm_stdsp24_mv = {
273 .num_adcs = 2, 273 .num_adcs = 2,
274 .num_dacs = 2, 274 .num_dacs = 2,
275 .type = SND_AK4524, 275 .type = SND_AK4524,
diff --git a/sound/pci/ice1712/juli.c b/sound/pci/ice1712/juli.c
index 5bb146703738..0dbaccf61f33 100644
--- a/sound/pci/ice1712/juli.c
+++ b/sound/pci/ice1712/juli.c
@@ -282,7 +282,7 @@ static const struct snd_akm4xxx_dac_channel juli_dac[] = {
282}; 282};
283 283
284 284
285static struct snd_akm4xxx akm_juli_dac = { 285static const struct snd_akm4xxx akm_juli_dac = {
286 .type = SND_AK4358, 286 .type = SND_AK4358,
287 .num_dacs = 8, /* DAC1 - analog out 287 .num_dacs = 8, /* DAC1 - analog out
288 DAC2 - analog in monitor 288 DAC2 - analog in monitor
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c
index 4f85482f3407..67fbb28bf033 100644
--- a/sound/pci/ice1712/phase.c
+++ b/sound/pci/ice1712/phase.c
@@ -102,7 +102,7 @@ static const unsigned char wm_vol[256] = {
102#define WM_VOL_MAX (sizeof(wm_vol) - 1) 102#define WM_VOL_MAX (sizeof(wm_vol) - 1)
103#define WM_VOL_MUTE 0x8000 103#define WM_VOL_MUTE 0x8000
104 104
105static struct snd_akm4xxx akm_phase22 = { 105static const struct snd_akm4xxx akm_phase22 = {
106 .type = SND_AK4524, 106 .type = SND_AK4524,
107 .num_dacs = 2, 107 .num_dacs = 2,
108 .num_adcs = 2, 108 .num_adcs = 2,
diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c
index f1b3732cc6d2..d145b5eb7ff8 100644
--- a/sound/pci/ice1712/quartet.c
+++ b/sound/pci/ice1712/quartet.c
@@ -386,7 +386,7 @@ static const struct snd_akm4xxx_adc_channel qtet_adc[] = {
386 AK_CONTROL(PCM_34_CAPTURE_VOLUME, 2), 386 AK_CONTROL(PCM_34_CAPTURE_VOLUME, 2),
387}; 387};
388 388
389static struct snd_akm4xxx akm_qtet_dac = { 389static const struct snd_akm4xxx akm_qtet_dac = {
390 .type = SND_AK4620, 390 .type = SND_AK4620,
391 .num_dacs = 4, /* DAC1 - Output 12 391 .num_dacs = 4, /* DAC1 - Output 12
392 */ 392 */
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c
index 5cc4213fcad0..6669c389f336 100644
--- a/sound/pci/ice1712/revo.c
+++ b/sound/pci/ice1712/revo.c
@@ -235,7 +235,7 @@ static const struct snd_akm4xxx_adc_channel revo51_adc[] = {
235 }, 235 },
236}; 236};
237 237
238static struct snd_akm4xxx akm_revo_front = { 238static const struct snd_akm4xxx akm_revo_front = {
239 .type = SND_AK4381, 239 .type = SND_AK4381,
240 .num_dacs = 2, 240 .num_dacs = 2,
241 .ops = { 241 .ops = {
@@ -256,7 +256,7 @@ static const struct snd_ak4xxx_private akm_revo_front_priv = {
256 .mask_flags = 0, 256 .mask_flags = 0,
257}; 257};
258 258
259static struct snd_akm4xxx akm_revo_surround = { 259static const struct snd_akm4xxx akm_revo_surround = {
260 .type = SND_AK4355, 260 .type = SND_AK4355,
261 .idx_offset = 1, 261 .idx_offset = 1,
262 .num_dacs = 6, 262 .num_dacs = 6,
@@ -278,7 +278,7 @@ static const struct snd_ak4xxx_private akm_revo_surround_priv = {
278 .mask_flags = 0, 278 .mask_flags = 0,
279}; 279};
280 280
281static struct snd_akm4xxx akm_revo51 = { 281static const struct snd_akm4xxx akm_revo51 = {
282 .type = SND_AK4358, 282 .type = SND_AK4358,
283 .num_dacs = 8, 283 .num_dacs = 8,
284 .ops = { 284 .ops = {
@@ -299,7 +299,7 @@ static const struct snd_ak4xxx_private akm_revo51_priv = {
299 .mask_flags = 0, 299 .mask_flags = 0,
300}; 300};
301 301
302static struct snd_akm4xxx akm_revo51_adc = { 302static const struct snd_akm4xxx akm_revo51_adc = {
303 .type = SND_AK5365, 303 .type = SND_AK5365,
304 .num_adcs = 2, 304 .num_adcs = 2,
305 .adc_info = revo51_adc, 305 .adc_info = revo51_adc,
@@ -346,7 +346,7 @@ static const struct snd_akm4xxx_dac_channel ap192_dac[] = {
346 AK_DAC("PCM Playback Volume", 2) 346 AK_DAC("PCM Playback Volume", 2)
347}; 347};
348 348
349static struct snd_akm4xxx akm_ap192 = { 349static const struct snd_akm4xxx akm_ap192 = {
350 .type = SND_AK4358, 350 .type = SND_AK4358,
351 .num_dacs = 2, 351 .num_dacs = 2,
352 .ops = { 352 .ops = {