|
33 | 33 | #include <linux/moduleparam.h> |
34 | 34 | #include <linux/mutex.h> |
35 | 35 | #include <sound/memalloc.h> |
36 | | -#ifdef CONFIG_SBUS |
37 | | -#include <asm/sbus.h> |
38 | | -#endif |
39 | 36 |
|
40 | 37 |
|
41 | 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 | 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 | 182 | * ALSA generic memory management |
@@ -249,11 +211,6 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size, |
249 | 211 | dmab->area = snd_malloc_pages(size, (unsigned long)device); |
250 | 212 | dmab->addr = 0; |
251 | 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 | 214 | #ifdef CONFIG_HAS_DMA |
258 | 215 | case SNDRV_DMA_TYPE_DEV: |
259 | 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 | 279 | case SNDRV_DMA_TYPE_CONTINUOUS: |
323 | 280 | snd_free_pages(dmab->area, dmab->bytes); |
324 | 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 | 282 | #ifdef CONFIG_HAS_DMA |
331 | 283 | case SNDRV_DMA_TYPE_DEV: |
332 | 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 | 385 | long pages = snd_allocated_pages >> (PAGE_SHIFT-12); |
434 | 386 | struct snd_mem_list *mem; |
435 | 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 | 390 | mutex_lock(&list_mutex); |
439 | 391 | seq_printf(seq, "pages : %li bytes (%li pages per %likB)\n", |
|
0 commit comments