summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-04 11:34:41 -0400
committerTakashi Iwai <tiwai@suse.de>2017-08-06 16:16:37 -0400
commit4647e8d512224265afad63aa27a6b22561f50d46 (patch)
tree545674c416e4becc6ac04988cfd11ec98d05b107
parent6d4d41f011454240e6890068c41e7530fba9f387 (diff)
ALSA: ice1712: add const to snd_ak4xxx_private structures
Declare snd_ak4xxx_private 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_ak4xxx_private 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_ak4xxx_private 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/phase.c2
-rw-r--r--sound/pci/ice1712/revo.c10
5 files changed, 16 insertions, 16 deletions
diff --git a/sound/pci/ice1712/delta.c b/sound/pci/ice1712/delta.c
index da5f37b7fdd0..4e470f09e215 100644
--- a/sound/pci/ice1712/delta.c
+++ b/sound/pci/ice1712/delta.c
@@ -454,7 +454,7 @@ static struct snd_akm4xxx akm_audiophile = {
454 } 454 }
455}; 455};
456 456
457static struct snd_ak4xxx_private akm_audiophile_priv = { 457static const struct snd_ak4xxx_private akm_audiophile_priv = {
458 .caddr = 2, 458 .caddr = 2,
459 .cif = 0, 459 .cif = 0,
460 .data_mask = ICE1712_DELTA_AP_DOUT, 460 .data_mask = ICE1712_DELTA_AP_DOUT,
@@ -475,7 +475,7 @@ static struct snd_akm4xxx akm_delta410 = {
475 } 475 }
476}; 476};
477 477
478static struct snd_ak4xxx_private akm_delta410_priv = { 478static const struct snd_ak4xxx_private akm_delta410_priv = {
479 .caddr = 0, 479 .caddr = 0,
480 .cif = 0, 480 .cif = 0,
481 .data_mask = ICE1712_DELTA_AP_DOUT, 481 .data_mask = ICE1712_DELTA_AP_DOUT,
@@ -497,7 +497,7 @@ static struct snd_akm4xxx akm_delta1010lt = {
497 } 497 }
498}; 498};
499 499
500static struct snd_ak4xxx_private akm_delta1010lt_priv = { 500static const struct snd_ak4xxx_private akm_delta1010lt_priv = {
501 .caddr = 2, 501 .caddr = 2,
502 .cif = 0, /* the default level of the CIF pin from AK4524 */ 502 .cif = 0, /* the default level of the CIF pin from AK4524 */
503 .data_mask = ICE1712_DELTA_1010LT_DOUT, 503 .data_mask = ICE1712_DELTA_1010LT_DOUT,
@@ -519,7 +519,7 @@ static struct snd_akm4xxx akm_delta66e = {
519 } 519 }
520}; 520};
521 521
522static struct snd_ak4xxx_private akm_delta66e_priv = { 522static const struct snd_ak4xxx_private akm_delta66e_priv = {
523 .caddr = 2, 523 .caddr = 2,
524 .cif = 0, /* the default level of the CIF pin from AK4524 */ 524 .cif = 0, /* the default level of the CIF pin from AK4524 */
525 .data_mask = ICE1712_DELTA_66E_DOUT, 525 .data_mask = ICE1712_DELTA_66E_DOUT,
@@ -542,7 +542,7 @@ static struct snd_akm4xxx akm_delta44 = {
542 } 542 }
543}; 543};
544 544
545static struct snd_ak4xxx_private akm_delta44_priv = { 545static const struct snd_ak4xxx_private akm_delta44_priv = {
546 .caddr = 2, 546 .caddr = 2,
547 .cif = 0, /* the default level of the CIF pin from AK4524 */ 547 .cif = 0, /* the default level of the CIF pin from AK4524 */
548 .data_mask = ICE1712_DELTA_CODEC_SERIAL_DATA, 548 .data_mask = ICE1712_DELTA_CODEC_SERIAL_DATA,
@@ -564,7 +564,7 @@ static struct snd_akm4xxx akm_vx442 = {
564 } 564 }
565}; 565};
566 566
567static struct snd_ak4xxx_private akm_vx442_priv = { 567static const struct snd_ak4xxx_private akm_vx442_priv = {
568 .caddr = 2, 568 .caddr = 2,
569 .cif = 0, 569 .cif = 0,
570 .data_mask = ICE1712_VX442_DOUT, 570 .data_mask = ICE1712_VX442_DOUT,
diff --git a/sound/pci/ice1712/ews.c b/sound/pci/ice1712/ews.c
index ec07136fc288..5bc14e8806a7 100644
--- a/sound/pci/ice1712/ews.c
+++ b/sound/pci/ice1712/ews.c
@@ -354,7 +354,7 @@ static struct snd_akm4xxx akm_ews88mt = {
354 } 354 }
355}; 355};
356 356
357static struct snd_ak4xxx_private akm_ews88mt_priv = { 357static const struct snd_ak4xxx_private akm_ews88mt_priv = {
358 .caddr = 2, 358 .caddr = 2,
359 .cif = 1, /* CIF high */ 359 .cif = 1, /* CIF high */
360 .data_mask = ICE1712_EWS88_SERIAL_DATA, 360 .data_mask = ICE1712_EWS88_SERIAL_DATA,
@@ -375,7 +375,7 @@ static struct snd_akm4xxx akm_ewx2496 = {
375 } 375 }
376}; 376};
377 377
378static struct snd_ak4xxx_private akm_ewx2496_priv = { 378static const struct snd_ak4xxx_private akm_ewx2496_priv = {
379 .caddr = 2, 379 .caddr = 2,
380 .cif = 1, /* CIF high */ 380 .cif = 1, /* CIF high */
381 .data_mask = ICE1712_EWS88_SERIAL_DATA, 381 .data_mask = ICE1712_EWS88_SERIAL_DATA,
@@ -396,7 +396,7 @@ static struct snd_akm4xxx akm_6fire = {
396 } 396 }
397}; 397};
398 398
399static struct snd_ak4xxx_private akm_6fire_priv = { 399static const struct snd_ak4xxx_private akm_6fire_priv = {
400 .caddr = 2, 400 .caddr = 2,
401 .cif = 1, /* CIF high */ 401 .cif = 1, /* CIF high */
402 .data_mask = ICE1712_6FIRE_SERIAL_DATA, 402 .data_mask = ICE1712_6FIRE_SERIAL_DATA,
diff --git a/sound/pci/ice1712/hoontech.c b/sound/pci/ice1712/hoontech.c
index a40001c1d9e8..de2fcc9a983e 100644
--- a/sound/pci/ice1712/hoontech.c
+++ b/sound/pci/ice1712/hoontech.c
@@ -278,7 +278,7 @@ static int snd_ice1712_value_init(struct snd_ice1712 *ice)
278 } 278 }
279 }; 279 };
280 280
281 static struct snd_ak4xxx_private akm_stdsp24_mv_priv = { 281 static const struct snd_ak4xxx_private akm_stdsp24_mv_priv = {
282 .caddr = 2, 282 .caddr = 2,
283 .cif = 1, /* CIF high */ 283 .cif = 1, /* CIF high */
284 .data_mask = ICE1712_STDSP24_SERIAL_DATA, 284 .data_mask = ICE1712_STDSP24_SERIAL_DATA,
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c
index e9ca89c9174b..4f85482f3407 100644
--- a/sound/pci/ice1712/phase.c
+++ b/sound/pci/ice1712/phase.c
@@ -108,7 +108,7 @@ static struct snd_akm4xxx akm_phase22 = {
108 .num_adcs = 2, 108 .num_adcs = 2,
109}; 109};
110 110
111static struct snd_ak4xxx_private akm_phase22_priv = { 111static const struct snd_ak4xxx_private akm_phase22_priv = {
112 .caddr = 2, 112 .caddr = 2,
113 .cif = 1, 113 .cif = 1,
114 .data_mask = 1 << 4, 114 .data_mask = 1 << 4,
diff --git a/sound/pci/ice1712/revo.c b/sound/pci/ice1712/revo.c
index 1d81ae677573..5cc4213fcad0 100644
--- a/sound/pci/ice1712/revo.c
+++ b/sound/pci/ice1712/revo.c
@@ -244,7 +244,7 @@ static struct snd_akm4xxx akm_revo_front = {
244 .dac_info = revo71_front, 244 .dac_info = revo71_front,
245}; 245};
246 246
247static struct snd_ak4xxx_private akm_revo_front_priv = { 247static const struct snd_ak4xxx_private akm_revo_front_priv = {
248 .caddr = 1, 248 .caddr = 1,
249 .cif = 0, 249 .cif = 0,
250 .data_mask = VT1724_REVO_CDOUT, 250 .data_mask = VT1724_REVO_CDOUT,
@@ -266,7 +266,7 @@ static struct snd_akm4xxx akm_revo_surround = {
266 .dac_info = revo71_surround, 266 .dac_info = revo71_surround,
267}; 267};
268 268
269static struct snd_ak4xxx_private akm_revo_surround_priv = { 269static const struct snd_ak4xxx_private akm_revo_surround_priv = {
270 .caddr = 3, 270 .caddr = 3,
271 .cif = 0, 271 .cif = 0,
272 .data_mask = VT1724_REVO_CDOUT, 272 .data_mask = VT1724_REVO_CDOUT,
@@ -287,7 +287,7 @@ static struct snd_akm4xxx akm_revo51 = {
287 .dac_info = revo51_dac, 287 .dac_info = revo51_dac,
288}; 288};
289 289
290static struct snd_ak4xxx_private akm_revo51_priv = { 290static const struct snd_ak4xxx_private akm_revo51_priv = {
291 .caddr = 2, 291 .caddr = 2,
292 .cif = 0, 292 .cif = 0,
293 .data_mask = VT1724_REVO_CDOUT, 293 .data_mask = VT1724_REVO_CDOUT,
@@ -305,7 +305,7 @@ static struct snd_akm4xxx akm_revo51_adc = {
305 .adc_info = revo51_adc, 305 .adc_info = revo51_adc,
306}; 306};
307 307
308static struct snd_ak4xxx_private akm_revo51_adc_priv = { 308static const struct snd_ak4xxx_private akm_revo51_adc_priv = {
309 .caddr = 2, 309 .caddr = 2,
310 .cif = 0, 310 .cif = 0,
311 .data_mask = VT1724_REVO_CDOUT, 311 .data_mask = VT1724_REVO_CDOUT,
@@ -355,7 +355,7 @@ static struct snd_akm4xxx akm_ap192 = {
355 .dac_info = ap192_dac, 355 .dac_info = ap192_dac,
356}; 356};
357 357
358static struct snd_ak4xxx_private akm_ap192_priv = { 358static const struct snd_ak4xxx_private akm_ap192_priv = {
359 .caddr = 2, 359 .caddr = 2,
360 .cif = 0, 360 .cif = 0,
361 .data_mask = VT1724_REVO_CDOUT, 361 .data_mask = VT1724_REVO_CDOUT,