diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 03:33:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-29 05:14:58 -0400 |
commit | 759ee81be6d87c150ea2b300c221b4fec8b5f646 (patch) | |
tree | 282aaa15a97bec11d593b3157f1ecbd19cc558a6 /sound/core | |
parent | 12b1c03df10da61e222b86f0e1ece9cdb2a909d6 (diff) |
alsa: Remove special SBUS dma support code.
No longer used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/memalloc.c | 50 |
1 files changed, 1 insertions, 49 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index ccaaac45fafb..3733351a27f2 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c | |||
@@ -33,9 +33,6 @@ | |||
33 | #include <linux/moduleparam.h> | 33 | #include <linux/moduleparam.h> |
34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> |
35 | #include <sound/memalloc.h> | 35 | #include <sound/memalloc.h> |
36 | #ifdef CONFIG_SBUS | ||
37 | #include <asm/sbus.h> | ||
38 | #endif | ||
39 | 36 | ||
40 | 37 | ||
41 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>"); | 38 | MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>, Jaroslav Kysela <perex@perex.cz>"); |
@@ -180,41 +177,6 @@ static void snd_free_dev_pages(struct device *dev, size_t size, void *ptr, | |||
180 | } | 177 | } |
181 | #endif /* CONFIG_HAS_DMA */ | 178 | #endif /* CONFIG_HAS_DMA */ |
182 | 179 | ||
183 | #ifdef CONFIG_SBUS | ||
184 | |||
185 | static void *snd_malloc_sbus_pages(struct device *dev, size_t size, | ||
186 | dma_addr_t *dma_addr) | ||
187 | { | ||
188 | struct sbus_dev *sdev = (struct sbus_dev *)dev; | ||
189 | int pg; | ||
190 | void *res; | ||
191 | |||
192 | snd_assert(size > 0, return NULL); | ||
193 | snd_assert(dma_addr != NULL, return NULL); | ||
194 | pg = get_order(size); | ||
195 | res = dma_alloc_coherent(&sdev->ofdev.dev, PAGE_SIZE * (1 << pg), | ||
196 | dma_addr, GFP_ATOMIC); | ||
197 | if (res != NULL) | ||
198 | inc_snd_pages(pg); | ||
199 | return res; | ||
200 | } | ||
201 | |||
202 | static void snd_free_sbus_pages(struct device *dev, size_t size, | ||
203 | void *ptr, dma_addr_t dma_addr) | ||
204 | { | ||
205 | struct sbus_dev *sdev = (struct sbus_dev *)dev; | ||
206 | int pg; | ||
207 | |||
208 | if (ptr == NULL) | ||
209 | return; | ||
210 | pg = get_order(size); | ||
211 | dec_snd_pages(pg); | ||
212 | dma_free_coherent(&sdev->ofdev.dev, PAGE_SIZE * (1 << pg), | ||
213 | ptr, dma_addr); | ||
214 | } | ||
215 | |||
216 | #endif /* CONFIG_SBUS */ | ||
217 | |||
218 | /* | 180 | /* |
219 | * | 181 | * |
220 | * ALSA generic memory management | 182 | * ALSA generic memory management |
@@ -249,11 +211,6 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size, | |||
249 | dmab->area = snd_malloc_pages(size, (unsigned long)device); | 211 | dmab->area = snd_malloc_pages(size, (unsigned long)device); |
250 | dmab->addr = 0; | 212 | dmab->addr = 0; |
251 | break; | 213 | break; |
252 | #ifdef CONFIG_SBUS | ||
253 | case SNDRV_DMA_TYPE_SBUS: | ||
254 | dmab->area = snd_malloc_sbus_pages(device, size, &dmab->addr); | ||
255 | break; | ||
256 | #endif | ||
257 | #ifdef CONFIG_HAS_DMA | 214 | #ifdef CONFIG_HAS_DMA |
258 | case SNDRV_DMA_TYPE_DEV: | 215 | case SNDRV_DMA_TYPE_DEV: |
259 | dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr); | 216 | dmab->area = snd_malloc_dev_pages(device, size, &dmab->addr); |
@@ -322,11 +279,6 @@ void snd_dma_free_pages(struct snd_dma_buffer *dmab) | |||
322 | case SNDRV_DMA_TYPE_CONTINUOUS: | 279 | case SNDRV_DMA_TYPE_CONTINUOUS: |
323 | snd_free_pages(dmab->area, dmab->bytes); | 280 | snd_free_pages(dmab->area, dmab->bytes); |
324 | break; | 281 | break; |
325 | #ifdef CONFIG_SBUS | ||
326 | case SNDRV_DMA_TYPE_SBUS: | ||
327 | snd_free_sbus_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); | ||
328 | break; | ||
329 | #endif | ||
330 | #ifdef CONFIG_HAS_DMA | 282 | #ifdef CONFIG_HAS_DMA |
331 | case SNDRV_DMA_TYPE_DEV: | 283 | case SNDRV_DMA_TYPE_DEV: |
332 | snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); | 284 | snd_free_dev_pages(dmab->dev.dev, dmab->bytes, dmab->area, dmab->addr); |
@@ -433,7 +385,7 @@ static int snd_mem_proc_read(struct seq_file *seq, void *offset) | |||
433 | long pages = snd_allocated_pages >> (PAGE_SHIFT-12); | 385 | long pages = snd_allocated_pages >> (PAGE_SHIFT-12); |
434 | struct snd_mem_list *mem; | 386 | struct snd_mem_list *mem; |
435 | int devno; | 387 | int devno; |
436 | static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" }; | 388 | static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG" }; |
437 | 389 | ||
438 | mutex_lock(&list_mutex); | 390 | mutex_lock(&list_mutex); |
439 | seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n", | 391 | seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n", |