summaryrefslogtreecommitdiffstats
path: root/sound/pci/cs46xx
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-01-26 10:41:05 -0500
committerTakashi Iwai <tiwai@suse.de>2017-01-26 11:01:48 -0500
commita6f9dec2a99aaae9950f57ceb3be1ffd897f3867 (patch)
treeef20f8ce171a625d8922ed9c90f88e8320d38804 /sound/pci/cs46xx
parente1a063f43a5e0435ecf8a2b6d42e10e20e8caf61 (diff)
ALSA: cs46xx: constify snd_pcm_ops structures
Declare snd_pcm_ops structures as const as they are either stored in the ops field of a snd_pcm_substream structure or passed as an argument to the function snd_pcm_set_ops. The function argument and the ops field are of type const, so snd_pcm_ops structures having this property can be made const too. File size before: sound/pci/cs46xx/cs46xx_lib.o text data bss dec hex filename 26047 5304 16 31367 7a87 sound/pci/cs46xx/cs46xx_lib.o File size after: sound/pci/cs46xx/cs46xx_lib.o text data bss dec hex filename 27335 4036 16 31387 7a9b sound/pci/cs46xx/cs46xx_lib.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/cs46xx')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index e561fd536f5b..e4cf3187b4dd 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -72,18 +72,18 @@
72static void amp_voyetra(struct snd_cs46xx *chip, int change); 72static void amp_voyetra(struct snd_cs46xx *chip, int change);
73 73
74#ifdef CONFIG_SND_CS46XX_NEW_DSP 74#ifdef CONFIG_SND_CS46XX_NEW_DSP
75static struct snd_pcm_ops snd_cs46xx_playback_rear_ops; 75static const struct snd_pcm_ops snd_cs46xx_playback_rear_ops;
76static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops; 76static const struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops;
77static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops; 77static const struct snd_pcm_ops snd_cs46xx_playback_clfe_ops;
78static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops; 78static const struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops;
79static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops; 79static const struct snd_pcm_ops snd_cs46xx_playback_iec958_ops;
80static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops; 80static const struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops;
81#endif 81#endif
82 82
83static struct snd_pcm_ops snd_cs46xx_playback_ops; 83static const struct snd_pcm_ops snd_cs46xx_playback_ops;
84static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops; 84static const struct snd_pcm_ops snd_cs46xx_playback_indirect_ops;
85static struct snd_pcm_ops snd_cs46xx_capture_ops; 85static const struct snd_pcm_ops snd_cs46xx_capture_ops;
86static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops; 86static const struct snd_pcm_ops snd_cs46xx_capture_indirect_ops;
87 87
88static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip, 88static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip,
89 unsigned short reg, 89 unsigned short reg,
@@ -1654,7 +1654,7 @@ static int snd_cs46xx_capture_close(struct snd_pcm_substream *substream)
1654} 1654}
1655 1655
1656#ifdef CONFIG_SND_CS46XX_NEW_DSP 1656#ifdef CONFIG_SND_CS46XX_NEW_DSP
1657static struct snd_pcm_ops snd_cs46xx_playback_rear_ops = { 1657static const struct snd_pcm_ops snd_cs46xx_playback_rear_ops = {
1658 .open = snd_cs46xx_playback_open_rear, 1658 .open = snd_cs46xx_playback_open_rear,
1659 .close = snd_cs46xx_playback_close, 1659 .close = snd_cs46xx_playback_close,
1660 .ioctl = snd_pcm_lib_ioctl, 1660 .ioctl = snd_pcm_lib_ioctl,
@@ -1665,7 +1665,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_rear_ops = {
1665 .pointer = snd_cs46xx_playback_direct_pointer, 1665 .pointer = snd_cs46xx_playback_direct_pointer,
1666}; 1666};
1667 1667
1668static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = { 1668static const struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = {
1669 .open = snd_cs46xx_playback_open_rear, 1669 .open = snd_cs46xx_playback_open_rear,
1670 .close = snd_cs46xx_playback_close, 1670 .close = snd_cs46xx_playback_close,
1671 .ioctl = snd_pcm_lib_ioctl, 1671 .ioctl = snd_pcm_lib_ioctl,
@@ -1677,7 +1677,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_indirect_rear_ops = {
1677 .ack = snd_cs46xx_playback_transfer, 1677 .ack = snd_cs46xx_playback_transfer,
1678}; 1678};
1679 1679
1680static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = { 1680static const struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = {
1681 .open = snd_cs46xx_playback_open_clfe, 1681 .open = snd_cs46xx_playback_open_clfe,
1682 .close = snd_cs46xx_playback_close, 1682 .close = snd_cs46xx_playback_close,
1683 .ioctl = snd_pcm_lib_ioctl, 1683 .ioctl = snd_pcm_lib_ioctl,
@@ -1688,7 +1688,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_clfe_ops = {
1688 .pointer = snd_cs46xx_playback_direct_pointer, 1688 .pointer = snd_cs46xx_playback_direct_pointer,
1689}; 1689};
1690 1690
1691static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = { 1691static const struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = {
1692 .open = snd_cs46xx_playback_open_clfe, 1692 .open = snd_cs46xx_playback_open_clfe,
1693 .close = snd_cs46xx_playback_close, 1693 .close = snd_cs46xx_playback_close,
1694 .ioctl = snd_pcm_lib_ioctl, 1694 .ioctl = snd_pcm_lib_ioctl,
@@ -1700,7 +1700,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_indirect_clfe_ops = {
1700 .ack = snd_cs46xx_playback_transfer, 1700 .ack = snd_cs46xx_playback_transfer,
1701}; 1701};
1702 1702
1703static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = { 1703static const struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = {
1704 .open = snd_cs46xx_playback_open_iec958, 1704 .open = snd_cs46xx_playback_open_iec958,
1705 .close = snd_cs46xx_playback_close_iec958, 1705 .close = snd_cs46xx_playback_close_iec958,
1706 .ioctl = snd_pcm_lib_ioctl, 1706 .ioctl = snd_pcm_lib_ioctl,
@@ -1711,7 +1711,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_iec958_ops = {
1711 .pointer = snd_cs46xx_playback_direct_pointer, 1711 .pointer = snd_cs46xx_playback_direct_pointer,
1712}; 1712};
1713 1713
1714static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = { 1714static const struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = {
1715 .open = snd_cs46xx_playback_open_iec958, 1715 .open = snd_cs46xx_playback_open_iec958,
1716 .close = snd_cs46xx_playback_close_iec958, 1716 .close = snd_cs46xx_playback_close_iec958,
1717 .ioctl = snd_pcm_lib_ioctl, 1717 .ioctl = snd_pcm_lib_ioctl,
@@ -1725,7 +1725,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_indirect_iec958_ops = {
1725 1725
1726#endif 1726#endif
1727 1727
1728static struct snd_pcm_ops snd_cs46xx_playback_ops = { 1728static const struct snd_pcm_ops snd_cs46xx_playback_ops = {
1729 .open = snd_cs46xx_playback_open, 1729 .open = snd_cs46xx_playback_open,
1730 .close = snd_cs46xx_playback_close, 1730 .close = snd_cs46xx_playback_close,
1731 .ioctl = snd_pcm_lib_ioctl, 1731 .ioctl = snd_pcm_lib_ioctl,
@@ -1736,7 +1736,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_ops = {
1736 .pointer = snd_cs46xx_playback_direct_pointer, 1736 .pointer = snd_cs46xx_playback_direct_pointer,
1737}; 1737};
1738 1738
1739static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = { 1739static const struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = {
1740 .open = snd_cs46xx_playback_open, 1740 .open = snd_cs46xx_playback_open,
1741 .close = snd_cs46xx_playback_close, 1741 .close = snd_cs46xx_playback_close,
1742 .ioctl = snd_pcm_lib_ioctl, 1742 .ioctl = snd_pcm_lib_ioctl,
@@ -1748,7 +1748,7 @@ static struct snd_pcm_ops snd_cs46xx_playback_indirect_ops = {
1748 .ack = snd_cs46xx_playback_transfer, 1748 .ack = snd_cs46xx_playback_transfer,
1749}; 1749};
1750 1750
1751static struct snd_pcm_ops snd_cs46xx_capture_ops = { 1751static const struct snd_pcm_ops snd_cs46xx_capture_ops = {
1752 .open = snd_cs46xx_capture_open, 1752 .open = snd_cs46xx_capture_open,
1753 .close = snd_cs46xx_capture_close, 1753 .close = snd_cs46xx_capture_close,
1754 .ioctl = snd_pcm_lib_ioctl, 1754 .ioctl = snd_pcm_lib_ioctl,
@@ -1759,7 +1759,7 @@ static struct snd_pcm_ops snd_cs46xx_capture_ops = {
1759 .pointer = snd_cs46xx_capture_direct_pointer, 1759 .pointer = snd_cs46xx_capture_direct_pointer,
1760}; 1760};
1761 1761
1762static struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = { 1762static const struct snd_pcm_ops snd_cs46xx_capture_indirect_ops = {
1763 .open = snd_cs46xx_capture_open, 1763 .open = snd_cs46xx_capture_open,
1764 .close = snd_cs46xx_capture_close, 1764 .close = snd_cs46xx_capture_close,
1765 .ioctl = snd_pcm_lib_ioctl, 1765 .ioctl = snd_pcm_lib_ioctl,