ALSA: constify functions in ac97

Signed-off-by: Hanno Boeck <hanno@hboeck.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by Hanno Boeck and committed by Takashi Iwai 3e8b3b90 f8fe80e4

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