diff options
author | Daniel Mack <daniel@zonque.org> | 2018-06-27 15:33:54 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-29 07:05:03 -0400 |
commit | a7160670b5e2d6b59e0f7a5b7e5bcef3b532c24c (patch) | |
tree | bc1fd59d8b21a3219bcc3512c82ae4e975670949 | |
parent | 95acb005fef2aeaeb63c20de98aca0ed5bd0efa2 (diff) |
ASoC: pxa: clean up function names in pxa2xx-lib
Clean up the namespace a bit and drop the __ prefix of all functions
exported by pxa2xx-lib. This improves the readability of the code.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | include/sound/pxa2xx-lib.h | 10 | ||||
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 10 | ||||
-rw-r--r-- | sound/arm/pxa2xx-pcm-lib.c | 22 | ||||
-rw-r--r-- | sound/soc/pxa/pxa2xx-pcm.c | 21 |
4 files changed, 28 insertions, 35 deletions
diff --git a/include/sound/pxa2xx-lib.h b/include/sound/pxa2xx-lib.h index 63f75450d3db..b43de38de8b2 100644 --- a/include/sound/pxa2xx-lib.h +++ b/include/sound/pxa2xx-lib.h | |||
@@ -10,14 +10,14 @@ struct snd_pcm_substream; | |||
10 | struct snd_pcm_hw_params; | 10 | struct snd_pcm_hw_params; |
11 | struct snd_pcm; | 11 | struct snd_pcm; |
12 | 12 | ||
13 | extern int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | 13 | extern int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, |
14 | struct snd_pcm_hw_params *params); | 14 | struct snd_pcm_hw_params *params); |
15 | extern int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream); | 15 | extern int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream); |
16 | extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd); | 16 | extern int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd); |
17 | extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream); | 17 | extern snd_pcm_uframes_t pxa2xx_pcm_pointer(struct snd_pcm_substream *substream); |
18 | extern int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream); | 18 | extern int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream); |
19 | extern int __pxa2xx_pcm_open(struct snd_pcm_substream *substream); | 19 | extern int pxa2xx_pcm_open(struct snd_pcm_substream *substream); |
20 | extern int __pxa2xx_pcm_close(struct snd_pcm_substream *substream); | 20 | extern int pxa2xx_pcm_close(struct snd_pcm_substream *substream); |
21 | extern int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, | 21 | extern int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, |
22 | struct vm_area_struct *vma); | 22 | struct vm_area_struct *vma); |
23 | extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream); | 23 | extern int pxa2xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream); |
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 7d8d7b7199dc..0d624337857b 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -70,7 +70,7 @@ static int pxa2xx_ac97_pcm_open(struct snd_pcm_substream *substream) | |||
70 | pxa2xx_audio_ops_t *platform_ops; | 70 | pxa2xx_audio_ops_t *platform_ops; |
71 | int ret, i; | 71 | int ret, i; |
72 | 72 | ||
73 | ret = __pxa2xx_pcm_open(substream); | 73 | ret = pxa2xx_pcm_open(substream); |
74 | if (ret) | 74 | if (ret) |
75 | return ret; | 75 | return ret; |
76 | 76 | ||
@@ -86,7 +86,7 @@ static int pxa2xx_ac97_pcm_open(struct snd_pcm_substream *substream) | |||
86 | if (platform_ops && platform_ops->startup) { | 86 | if (platform_ops && platform_ops->startup) { |
87 | ret = platform_ops->startup(substream, platform_ops->priv); | 87 | ret = platform_ops->startup(substream, platform_ops->priv); |
88 | if (ret < 0) | 88 | if (ret < 0) |
89 | __pxa2xx_pcm_close(substream); | 89 | pxa2xx_pcm_close(substream); |
90 | } | 90 | } |
91 | 91 | ||
92 | return ret; | 92 | return ret; |
@@ -110,7 +110,7 @@ static int pxa2xx_ac97_pcm_prepare(struct snd_pcm_substream *substream) | |||
110 | AC97_PCM_FRONT_DAC_RATE : AC97_PCM_LR_ADC_RATE; | 110 | AC97_PCM_FRONT_DAC_RATE : AC97_PCM_LR_ADC_RATE; |
111 | int ret; | 111 | int ret; |
112 | 112 | ||
113 | ret = __pxa2xx_pcm_prepare(substream); | 113 | ret = pxa2xx_pcm_prepare(substream); |
114 | if (ret < 0) | 114 | if (ret < 0) |
115 | return ret; | 115 | return ret; |
116 | 116 | ||
@@ -178,8 +178,8 @@ static const struct snd_pcm_ops pxa2xx_pcm_ops = { | |||
178 | .open = pxa2xx_ac97_pcm_open, | 178 | .open = pxa2xx_ac97_pcm_open, |
179 | .close = pxa2xx_ac97_pcm_close, | 179 | .close = pxa2xx_ac97_pcm_close, |
180 | .ioctl = snd_pcm_lib_ioctl, | 180 | .ioctl = snd_pcm_lib_ioctl, |
181 | .hw_params = __pxa2xx_pcm_hw_params, | 181 | .hw_params = pxa2xx_pcm_hw_params, |
182 | .hw_free = __pxa2xx_pcm_hw_free, | 182 | .hw_free = pxa2xx_pcm_hw_free, |
183 | .prepare = pxa2xx_ac97_pcm_prepare, | 183 | .prepare = pxa2xx_ac97_pcm_prepare, |
184 | .trigger = pxa2xx_pcm_trigger, | 184 | .trigger = pxa2xx_pcm_trigger, |
185 | .pointer = pxa2xx_pcm_pointer, | 185 | .pointer = pxa2xx_pcm_pointer, |
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index b927fa5ddbc0..dc56dbebf441 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
@@ -33,8 +33,8 @@ static const struct snd_pcm_hardware pxa2xx_pcm_hardware = { | |||
33 | .fifo_size = 32, | 33 | .fifo_size = 32, |
34 | }; | 34 | }; |
35 | 35 | ||
36 | int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | 36 | int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, |
37 | struct snd_pcm_hw_params *params) | 37 | struct snd_pcm_hw_params *params) |
38 | { | 38 | { |
39 | struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); | 39 | struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); |
40 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 40 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
@@ -62,14 +62,14 @@ int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
62 | 62 | ||
63 | return 0; | 63 | return 0; |
64 | } | 64 | } |
65 | EXPORT_SYMBOL(__pxa2xx_pcm_hw_params); | 65 | EXPORT_SYMBOL(pxa2xx_pcm_hw_params); |
66 | 66 | ||
67 | int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) | 67 | int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) |
68 | { | 68 | { |
69 | snd_pcm_set_runtime_buffer(substream, NULL); | 69 | snd_pcm_set_runtime_buffer(substream, NULL); |
70 | return 0; | 70 | return 0; |
71 | } | 71 | } |
72 | EXPORT_SYMBOL(__pxa2xx_pcm_hw_free); | 72 | EXPORT_SYMBOL(pxa2xx_pcm_hw_free); |
73 | 73 | ||
74 | int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | 74 | int pxa2xx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) |
75 | { | 75 | { |
@@ -84,13 +84,13 @@ pxa2xx_pcm_pointer(struct snd_pcm_substream *substream) | |||
84 | } | 84 | } |
85 | EXPORT_SYMBOL(pxa2xx_pcm_pointer); | 85 | EXPORT_SYMBOL(pxa2xx_pcm_pointer); |
86 | 86 | ||
87 | int __pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) | 87 | int pxa2xx_pcm_prepare(struct snd_pcm_substream *substream) |
88 | { | 88 | { |
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | EXPORT_SYMBOL(__pxa2xx_pcm_prepare); | 91 | EXPORT_SYMBOL(pxa2xx_pcm_prepare); |
92 | 92 | ||
93 | int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) | 93 | int pxa2xx_pcm_open(struct snd_pcm_substream *substream) |
94 | { | 94 | { |
95 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 95 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
96 | struct snd_pcm_runtime *runtime = substream->runtime; | 96 | struct snd_pcm_runtime *runtime = substream->runtime; |
@@ -127,13 +127,13 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) | |||
127 | substream, dma_request_slave_channel(rtd->cpu_dai->dev, | 127 | substream, dma_request_slave_channel(rtd->cpu_dai->dev, |
128 | dma_params->chan_name)); | 128 | dma_params->chan_name)); |
129 | } | 129 | } |
130 | EXPORT_SYMBOL(__pxa2xx_pcm_open); | 130 | EXPORT_SYMBOL(pxa2xx_pcm_open); |
131 | 131 | ||
132 | int __pxa2xx_pcm_close(struct snd_pcm_substream *substream) | 132 | int pxa2xx_pcm_close(struct snd_pcm_substream *substream) |
133 | { | 133 | { |
134 | return snd_dmaengine_pcm_close_release_chan(substream); | 134 | return snd_dmaengine_pcm_close_release_chan(substream); |
135 | } | 135 | } |
136 | EXPORT_SYMBOL(__pxa2xx_pcm_close); | 136 | EXPORT_SYMBOL(pxa2xx_pcm_close); |
137 | 137 | ||
138 | int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, | 138 | int pxa2xx_pcm_mmap(struct snd_pcm_substream *substream, |
139 | struct vm_area_struct *vma) | 139 | struct vm_area_struct *vma) |
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c index 445e691126e5..da252d1f732e 100644 --- a/sound/soc/pxa/pxa2xx-pcm.c +++ b/sound/soc/pxa/pxa2xx-pcm.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <sound/pxa2xx-lib.h> | 20 | #include <sound/pxa2xx-lib.h> |
21 | #include <sound/dmaengine_pcm.h> | 21 | #include <sound/dmaengine_pcm.h> |
22 | 22 | ||
23 | static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | 23 | static int __pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, |
24 | struct snd_pcm_hw_params *params) | 24 | struct snd_pcm_hw_params *params) |
25 | { | 25 | { |
26 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 26 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
27 | struct snd_dmaengine_dai_dma_data *dma; | 27 | struct snd_dmaengine_dai_dma_data *dma; |
@@ -33,23 +33,16 @@ static int pxa2xx_pcm_hw_params(struct snd_pcm_substream *substream, | |||
33 | if (!dma) | 33 | if (!dma) |
34 | return 0; | 34 | return 0; |
35 | 35 | ||
36 | return __pxa2xx_pcm_hw_params(substream, params); | 36 | return pxa2xx_pcm_hw_params(substream, params); |
37 | } | ||
38 | |||
39 | static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream) | ||
40 | { | ||
41 | __pxa2xx_pcm_hw_free(substream); | ||
42 | |||
43 | return 0; | ||
44 | } | 37 | } |
45 | 38 | ||
46 | static const struct snd_pcm_ops pxa2xx_pcm_ops = { | 39 | static const struct snd_pcm_ops pxa2xx_pcm_ops = { |
47 | .open = __pxa2xx_pcm_open, | 40 | .open = pxa2xx_pcm_open, |
48 | .close = __pxa2xx_pcm_close, | 41 | .close = pxa2xx_pcm_close, |
49 | .ioctl = snd_pcm_lib_ioctl, | 42 | .ioctl = snd_pcm_lib_ioctl, |
50 | .hw_params = pxa2xx_pcm_hw_params, | 43 | .hw_params = __pxa2xx_pcm_hw_params, |
51 | .hw_free = pxa2xx_pcm_hw_free, | 44 | .hw_free = pxa2xx_pcm_hw_free, |
52 | .prepare = __pxa2xx_pcm_prepare, | 45 | .prepare = pxa2xx_pcm_prepare, |
53 | .trigger = pxa2xx_pcm_trigger, | 46 | .trigger = pxa2xx_pcm_trigger, |
54 | .pointer = pxa2xx_pcm_pointer, | 47 | .pointer = pxa2xx_pcm_pointer, |
55 | .mmap = pxa2xx_pcm_mmap, | 48 | .mmap = pxa2xx_pcm_mmap, |