aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanno Boeck <hanno@hboeck.de>2011-01-14 13:14:47 -0500
committerTakashi Iwai <tiwai@suse.de>2011-01-14 13:14:47 -0500
commit3e8b3b90fecedcf20d895c4e6ad01a379fe252bf (patch)
tree44c94a9fc098303fbd47e0d10b40ec258e9f816f
parentf8fe80e4383bf5f542beb80bf2abe9fc1505c366 (diff)
ALSA: constify functions in ac97
Signed-off-by: Hanno Boeck <hanno@hboeck.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--include/sound/ac97_codec.h2
-rw-r--r--sound/pci/ac97/ac97_codec.c2
-rw-r--r--sound/pci/ac97/ac97_patch.c62
3 files changed, 33 insertions, 33 deletions
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 49400459b477..b602f475cdbb 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -477,7 +477,7 @@ struct snd_ac97_template {
477 477
478struct snd_ac97 { 478struct snd_ac97 {
479 /* -- lowlevel (hardware) driver specific -- */ 479 /* -- lowlevel (hardware) driver specific -- */
480 struct snd_ac97_build_ops * build_ops; 480 const struct snd_ac97_build_ops *build_ops;
481 void *private_data; 481 void *private_data;
482 void (*private_free) (struct snd_ac97 *ac97); 482 void (*private_free) (struct snd_ac97 *ac97);
483 /* --- */ 483 /* --- */
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 0fc614ce16c1..cb62d178b3e0 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -1961,7 +1961,7 @@ static int snd_ac97_dev_disconnect(struct snd_device *device)
1961} 1961}
1962 1962
1963/* build_ops to do nothing */ 1963/* build_ops to do nothing */
1964static struct snd_ac97_build_ops null_build_ops; 1964static const struct snd_ac97_build_ops null_build_ops;
1965 1965
1966#ifdef CONFIG_SND_AC97_POWER_SAVE 1966#ifdef CONFIG_SND_AC97_POWER_SAVE
1967static void do_update_power(struct work_struct *work) 1967static void do_update_power(struct work_struct *work)
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index e68c98ef4041..bf47574ca1f0 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -371,7 +371,7 @@ static int patch_yamaha_ymf743_build_spdif(struct snd_ac97 *ac97)
371 return 0; 371 return 0;
372} 372}
373 373
374static struct snd_ac97_build_ops patch_yamaha_ymf743_ops = { 374static const struct snd_ac97_build_ops patch_yamaha_ymf743_ops = {
375 .build_spdif = patch_yamaha_ymf743_build_spdif, 375 .build_spdif = patch_yamaha_ymf743_build_spdif,
376 .build_3d = patch_yamaha_ymf7x3_3d, 376 .build_3d = patch_yamaha_ymf7x3_3d,
377}; 377};
@@ -455,7 +455,7 @@ static int patch_yamaha_ymf753_post_spdif(struct snd_ac97 * ac97)
455 return 0; 455 return 0;
456} 456}
457 457
458static struct snd_ac97_build_ops patch_yamaha_ymf753_ops = { 458static const struct snd_ac97_build_ops patch_yamaha_ymf753_ops = {
459 .build_3d = patch_yamaha_ymf7x3_3d, 459 .build_3d = patch_yamaha_ymf7x3_3d,
460 .build_post_spdif = patch_yamaha_ymf753_post_spdif 460 .build_post_spdif = patch_yamaha_ymf753_post_spdif
461}; 461};
@@ -502,7 +502,7 @@ static int patch_wolfson_wm9703_specific(struct snd_ac97 * ac97)
502 return 0; 502 return 0;
503} 503}
504 504
505static struct snd_ac97_build_ops patch_wolfson_wm9703_ops = { 505static const struct snd_ac97_build_ops patch_wolfson_wm9703_ops = {
506 .build_specific = patch_wolfson_wm9703_specific, 506 .build_specific = patch_wolfson_wm9703_specific,
507}; 507};
508 508
@@ -533,7 +533,7 @@ static int patch_wolfson_wm9704_specific(struct snd_ac97 * ac97)
533 return 0; 533 return 0;
534} 534}
535 535
536static struct snd_ac97_build_ops patch_wolfson_wm9704_ops = { 536static const struct snd_ac97_build_ops patch_wolfson_wm9704_ops = {
537 .build_specific = patch_wolfson_wm9704_specific, 537 .build_specific = patch_wolfson_wm9704_specific,
538}; 538};
539 539
@@ -677,7 +677,7 @@ static int patch_wolfson_wm9711_specific(struct snd_ac97 * ac97)
677 return 0; 677 return 0;
678} 678}
679 679
680static struct snd_ac97_build_ops patch_wolfson_wm9711_ops = { 680static const struct snd_ac97_build_ops patch_wolfson_wm9711_ops = {
681 .build_specific = patch_wolfson_wm9711_specific, 681 .build_specific = patch_wolfson_wm9711_specific,
682}; 682};
683 683
@@ -871,7 +871,7 @@ static void patch_wolfson_wm9713_resume (struct snd_ac97 * ac97)
871} 871}
872#endif 872#endif
873 873
874static struct snd_ac97_build_ops patch_wolfson_wm9713_ops = { 874static const struct snd_ac97_build_ops patch_wolfson_wm9713_ops = {
875 .build_specific = patch_wolfson_wm9713_specific, 875 .build_specific = patch_wolfson_wm9713_specific,
876 .build_3d = patch_wolfson_wm9713_3d, 876 .build_3d = patch_wolfson_wm9713_3d,
877#ifdef CONFIG_PM 877#ifdef CONFIG_PM
@@ -976,7 +976,7 @@ static int patch_sigmatel_stac97xx_specific(struct snd_ac97 * ac97)
976 return 0; 976 return 0;
977} 977}
978 978
979static struct snd_ac97_build_ops patch_sigmatel_stac9700_ops = { 979static const struct snd_ac97_build_ops patch_sigmatel_stac9700_ops = {
980 .build_3d = patch_sigmatel_stac9700_3d, 980 .build_3d = patch_sigmatel_stac9700_3d,
981 .build_specific = patch_sigmatel_stac97xx_specific 981 .build_specific = patch_sigmatel_stac97xx_specific
982}; 982};
@@ -1023,7 +1023,7 @@ static int patch_sigmatel_stac9708_specific(struct snd_ac97 *ac97)
1023 return patch_sigmatel_stac97xx_specific(ac97); 1023 return patch_sigmatel_stac97xx_specific(ac97);
1024} 1024}
1025 1025
1026static struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = { 1026static const struct snd_ac97_build_ops patch_sigmatel_stac9708_ops = {
1027 .build_3d = patch_sigmatel_stac9708_3d, 1027 .build_3d = patch_sigmatel_stac9708_3d,
1028 .build_specific = patch_sigmatel_stac9708_specific 1028 .build_specific = patch_sigmatel_stac9708_specific
1029}; 1029};
@@ -1252,7 +1252,7 @@ static int patch_sigmatel_stac9758_specific(struct snd_ac97 *ac97)
1252 return 0; 1252 return 0;
1253} 1253}
1254 1254
1255static struct snd_ac97_build_ops patch_sigmatel_stac9758_ops = { 1255static const struct snd_ac97_build_ops patch_sigmatel_stac9758_ops = {
1256 .build_3d = patch_sigmatel_stac9700_3d, 1256 .build_3d = patch_sigmatel_stac9700_3d,
1257 .build_specific = patch_sigmatel_stac9758_specific 1257 .build_specific = patch_sigmatel_stac9758_specific
1258}; 1258};
@@ -1327,7 +1327,7 @@ static int patch_cirrus_build_spdif(struct snd_ac97 * ac97)
1327 return 0; 1327 return 0;
1328} 1328}
1329 1329
1330static struct snd_ac97_build_ops patch_cirrus_ops = { 1330static const struct snd_ac97_build_ops patch_cirrus_ops = {
1331 .build_spdif = patch_cirrus_build_spdif 1331 .build_spdif = patch_cirrus_build_spdif
1332}; 1332};
1333 1333
@@ -1384,7 +1384,7 @@ static int patch_conexant_build_spdif(struct snd_ac97 * ac97)
1384 return 0; 1384 return 0;
1385} 1385}
1386 1386
1387static struct snd_ac97_build_ops patch_conexant_ops = { 1387static const struct snd_ac97_build_ops patch_conexant_ops = {
1388 .build_spdif = patch_conexant_build_spdif 1388 .build_spdif = patch_conexant_build_spdif
1389}; 1389};
1390 1390
@@ -1560,7 +1560,7 @@ static void patch_ad1881_chained(struct snd_ac97 * ac97, int unchained_idx, int
1560 } 1560 }
1561} 1561}
1562 1562
1563static struct snd_ac97_build_ops patch_ad1881_build_ops = { 1563static const struct snd_ac97_build_ops patch_ad1881_build_ops = {
1564#ifdef CONFIG_PM 1564#ifdef CONFIG_PM
1565 .resume = ad18xx_resume 1565 .resume = ad18xx_resume
1566#endif 1566#endif
@@ -1647,7 +1647,7 @@ static int patch_ad1885_specific(struct snd_ac97 * ac97)
1647 return 0; 1647 return 0;
1648} 1648}
1649 1649
1650static struct snd_ac97_build_ops patch_ad1885_build_ops = { 1650static const struct snd_ac97_build_ops patch_ad1885_build_ops = {
1651 .build_specific = &patch_ad1885_specific, 1651 .build_specific = &patch_ad1885_specific,
1652#ifdef CONFIG_PM 1652#ifdef CONFIG_PM
1653 .resume = ad18xx_resume 1653 .resume = ad18xx_resume
@@ -1674,7 +1674,7 @@ static int patch_ad1886_specific(struct snd_ac97 * ac97)
1674 return 0; 1674 return 0;
1675} 1675}
1676 1676
1677static struct snd_ac97_build_ops patch_ad1886_build_ops = { 1677static const struct snd_ac97_build_ops patch_ad1886_build_ops = {
1678 .build_specific = &patch_ad1886_specific, 1678 .build_specific = &patch_ad1886_specific,
1679#ifdef CONFIG_PM 1679#ifdef CONFIG_PM
1680 .resume = ad18xx_resume 1680 .resume = ad18xx_resume
@@ -1881,7 +1881,7 @@ static int patch_ad1981a_specific(struct snd_ac97 * ac97)
1881 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 1881 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
1882} 1882}
1883 1883
1884static struct snd_ac97_build_ops patch_ad1981a_build_ops = { 1884static const struct snd_ac97_build_ops patch_ad1981a_build_ops = {
1885 .build_post_spdif = patch_ad198x_post_spdif, 1885 .build_post_spdif = patch_ad198x_post_spdif,
1886 .build_specific = patch_ad1981a_specific, 1886 .build_specific = patch_ad1981a_specific,
1887#ifdef CONFIG_PM 1887#ifdef CONFIG_PM
@@ -1936,7 +1936,7 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97)
1936 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense)); 1936 ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
1937} 1937}
1938 1938
1939static struct snd_ac97_build_ops patch_ad1981b_build_ops = { 1939static const struct snd_ac97_build_ops patch_ad1981b_build_ops = {
1940 .build_post_spdif = patch_ad198x_post_spdif, 1940 .build_post_spdif = patch_ad198x_post_spdif,
1941 .build_specific = patch_ad1981b_specific, 1941 .build_specific = patch_ad1981b_specific,
1942#ifdef CONFIG_PM 1942#ifdef CONFIG_PM
@@ -2075,7 +2075,7 @@ static int patch_ad1888_specific(struct snd_ac97 *ac97)
2075 return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls)); 2075 return patch_build_controls(ac97, snd_ac97_ad1888_controls, ARRAY_SIZE(snd_ac97_ad1888_controls));
2076} 2076}
2077 2077
2078static struct snd_ac97_build_ops patch_ad1888_build_ops = { 2078static const struct snd_ac97_build_ops patch_ad1888_build_ops = {
2079 .build_post_spdif = patch_ad198x_post_spdif, 2079 .build_post_spdif = patch_ad198x_post_spdif,
2080 .build_specific = patch_ad1888_specific, 2080 .build_specific = patch_ad1888_specific,
2081#ifdef CONFIG_PM 2081#ifdef CONFIG_PM
@@ -2124,7 +2124,7 @@ static int patch_ad1980_specific(struct snd_ac97 *ac97)
2124 return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1); 2124 return patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1);
2125} 2125}
2126 2126
2127static struct snd_ac97_build_ops patch_ad1980_build_ops = { 2127static const struct snd_ac97_build_ops patch_ad1980_build_ops = {
2128 .build_post_spdif = patch_ad198x_post_spdif, 2128 .build_post_spdif = patch_ad198x_post_spdif,
2129 .build_specific = patch_ad1980_specific, 2129 .build_specific = patch_ad1980_specific,
2130#ifdef CONFIG_PM 2130#ifdef CONFIG_PM
@@ -2239,7 +2239,7 @@ static int patch_ad1985_specific(struct snd_ac97 *ac97)
2239 ARRAY_SIZE(snd_ac97_ad1985_controls)); 2239 ARRAY_SIZE(snd_ac97_ad1985_controls));
2240} 2240}
2241 2241
2242static struct snd_ac97_build_ops patch_ad1985_build_ops = { 2242static const struct snd_ac97_build_ops patch_ad1985_build_ops = {
2243 .build_post_spdif = patch_ad198x_post_spdif, 2243 .build_post_spdif = patch_ad198x_post_spdif,
2244 .build_specific = patch_ad1985_specific, 2244 .build_specific = patch_ad1985_specific,
2245#ifdef CONFIG_PM 2245#ifdef CONFIG_PM
@@ -2531,7 +2531,7 @@ static int patch_ad1986_specific(struct snd_ac97 *ac97)
2531 ARRAY_SIZE(snd_ac97_ad1985_controls)); 2531 ARRAY_SIZE(snd_ac97_ad1985_controls));
2532} 2532}
2533 2533
2534static struct snd_ac97_build_ops patch_ad1986_build_ops = { 2534static const struct snd_ac97_build_ops patch_ad1986_build_ops = {
2535 .build_post_spdif = patch_ad198x_post_spdif, 2535 .build_post_spdif = patch_ad198x_post_spdif,
2536 .build_specific = patch_ad1986_specific, 2536 .build_specific = patch_ad1986_specific,
2537#ifdef CONFIG_PM 2537#ifdef CONFIG_PM
@@ -2636,7 +2636,7 @@ static int patch_alc650_specific(struct snd_ac97 * ac97)
2636 return 0; 2636 return 0;
2637} 2637}
2638 2638
2639static struct snd_ac97_build_ops patch_alc650_ops = { 2639static const struct snd_ac97_build_ops patch_alc650_ops = {
2640 .build_specific = patch_alc650_specific, 2640 .build_specific = patch_alc650_specific,
2641 .update_jacks = alc650_update_jacks 2641 .update_jacks = alc650_update_jacks
2642}; 2642};
@@ -2788,7 +2788,7 @@ static int patch_alc655_specific(struct snd_ac97 * ac97)
2788 return 0; 2788 return 0;
2789} 2789}
2790 2790
2791static struct snd_ac97_build_ops patch_alc655_ops = { 2791static const struct snd_ac97_build_ops patch_alc655_ops = {
2792 .build_specific = patch_alc655_specific, 2792 .build_specific = patch_alc655_specific,
2793 .update_jacks = alc655_update_jacks 2793 .update_jacks = alc655_update_jacks
2794}; 2794};
@@ -2900,7 +2900,7 @@ static int patch_alc850_specific(struct snd_ac97 *ac97)
2900 return 0; 2900 return 0;
2901} 2901}
2902 2902
2903static struct snd_ac97_build_ops patch_alc850_ops = { 2903static const struct snd_ac97_build_ops patch_alc850_ops = {
2904 .build_specific = patch_alc850_specific, 2904 .build_specific = patch_alc850_specific,
2905 .update_jacks = alc850_update_jacks 2905 .update_jacks = alc850_update_jacks
2906}; 2906};
@@ -2962,7 +2962,7 @@ static int patch_cm9738_specific(struct snd_ac97 * ac97)
2962 return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls)); 2962 return patch_build_controls(ac97, snd_ac97_cm9738_controls, ARRAY_SIZE(snd_ac97_cm9738_controls));
2963} 2963}
2964 2964
2965static struct snd_ac97_build_ops patch_cm9738_ops = { 2965static const struct snd_ac97_build_ops patch_cm9738_ops = {
2966 .build_specific = patch_cm9738_specific, 2966 .build_specific = patch_cm9738_specific,
2967 .update_jacks = cm9738_update_jacks 2967 .update_jacks = cm9738_update_jacks
2968}; 2968};
@@ -3053,7 +3053,7 @@ static int patch_cm9739_post_spdif(struct snd_ac97 * ac97)
3053 return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif)); 3053 return patch_build_controls(ac97, snd_ac97_cm9739_controls_spdif, ARRAY_SIZE(snd_ac97_cm9739_controls_spdif));
3054} 3054}
3055 3055
3056static struct snd_ac97_build_ops patch_cm9739_ops = { 3056static const struct snd_ac97_build_ops patch_cm9739_ops = {
3057 .build_specific = patch_cm9739_specific, 3057 .build_specific = patch_cm9739_specific,
3058 .build_post_spdif = patch_cm9739_post_spdif, 3058 .build_post_spdif = patch_cm9739_post_spdif,
3059 .update_jacks = cm9739_update_jacks 3059 .update_jacks = cm9739_update_jacks
@@ -3227,7 +3227,7 @@ static int patch_cm9761_specific(struct snd_ac97 * ac97)
3227 return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls)); 3227 return patch_build_controls(ac97, snd_ac97_cm9761_controls, ARRAY_SIZE(snd_ac97_cm9761_controls));
3228} 3228}
3229 3229
3230static struct snd_ac97_build_ops patch_cm9761_ops = { 3230static const struct snd_ac97_build_ops patch_cm9761_ops = {
3231 .build_specific = patch_cm9761_specific, 3231 .build_specific = patch_cm9761_specific,
3232 .build_post_spdif = patch_cm9761_post_spdif, 3232 .build_post_spdif = patch_cm9761_post_spdif,
3233 .update_jacks = cm9761_update_jacks 3233 .update_jacks = cm9761_update_jacks
@@ -3323,7 +3323,7 @@ static int patch_cm9780_specific(struct snd_ac97 *ac97)
3323 return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls)); 3323 return patch_build_controls(ac97, cm9780_controls, ARRAY_SIZE(cm9780_controls));
3324} 3324}
3325 3325
3326static struct snd_ac97_build_ops patch_cm9780_ops = { 3326static const struct snd_ac97_build_ops patch_cm9780_ops = {
3327 .build_specific = patch_cm9780_specific, 3327 .build_specific = patch_cm9780_specific,
3328 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */ 3328 .build_post_spdif = patch_cm9761_post_spdif /* identical with CM9761 */
3329}; 3329};
@@ -3443,7 +3443,7 @@ static int patch_vt1616_specific(struct snd_ac97 * ac97)
3443 return 0; 3443 return 0;
3444} 3444}
3445 3445
3446static struct snd_ac97_build_ops patch_vt1616_ops = { 3446static const struct snd_ac97_build_ops patch_vt1616_ops = {
3447 .build_specific = patch_vt1616_specific 3447 .build_specific = patch_vt1616_specific
3448}; 3448};
3449 3449
@@ -3797,7 +3797,7 @@ static int patch_it2646_specific(struct snd_ac97 * ac97)
3797 return 0; 3797 return 0;
3798} 3798}
3799 3799
3800static struct snd_ac97_build_ops patch_it2646_ops = { 3800static const struct snd_ac97_build_ops patch_it2646_ops = {
3801 .build_specific = patch_it2646_specific, 3801 .build_specific = patch_it2646_specific,
3802 .update_jacks = it2646_update_jacks 3802 .update_jacks = it2646_update_jacks
3803}; 3803};
@@ -3831,7 +3831,7 @@ static int patch_si3036_specific(struct snd_ac97 * ac97)
3831 return 0; 3831 return 0;
3832} 3832}
3833 3833
3834static struct snd_ac97_build_ops patch_si3036_ops = { 3834static const struct snd_ac97_build_ops patch_si3036_ops = {
3835 .build_specific = patch_si3036_specific, 3835 .build_specific = patch_si3036_specific,
3836}; 3836};
3837 3837
@@ -3898,7 +3898,7 @@ static int patch_ucb1400_specific(struct snd_ac97 * ac97)
3898 return 0; 3898 return 0;
3899} 3899}
3900 3900
3901static struct snd_ac97_build_ops patch_ucb1400_ops = { 3901static const struct snd_ac97_build_ops patch_ucb1400_ops = {
3902 .build_specific = patch_ucb1400_specific, 3902 .build_specific = patch_ucb1400_specific,
3903}; 3903};
3904 3904