Changeset 124
- Timestamp:
- Jun 10, 2007, 6:36:39 AM (18 years ago)
- Location:
- GPL/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/core/memalloc.c
r76 r124 24 24 #include <sound/driver.h> 25 25 #include <sound/info.h> 26 #include <linux/proc_fs.h> 26 27 #include <sound/memalloc.h> 27 28 … … 57 58 struct list_head list; 58 59 }; 59 60 #include <linux/proc_fs.h>61 static inline struct proc_dir_entry *create_proc_read_entry(const char *name,62 mode_t mode, struct proc_dir_entry *base,63 read_proc_t *read_proc, void * data)64 {65 struct proc_dir_entry *res=create_proc_entry(name,mode,base);66 if (res) {67 res->read_proc=read_proc;68 res->data=data;69 }70 return res;71 }72 60 73 61 /* id for pre-allocated buffers */ -
GPL/trunk/alsa-kernel/core/misc.c
r123 r124 520 520 #endif /* kernel version < 2.3.0 && CONFIG_APM */ 521 521 522 static void run_workqueue(struct workqueue_struct *wq)523 {524 unsigned long flags;525 526 spin_lock_irqsave(&wq->lock, flags);527 while (!list_empty(&wq->worklist)) {528 struct work_struct *work = list_entry(wq->worklist.next,529 struct work_struct, entry);530 void (*f) (void *) = work->func;531 void *data = work->data;532 533 list_del_init(wq->worklist.next);534 spin_unlock_irqrestore(&wq->lock, flags);535 clear_bit(0, &work->pending);536 f(data);537 spin_lock_irqsave(&wq->lock, flags);538 wake_up(&wq->work_done);539 }540 spin_unlock_irqrestore(&wq->lock, flags);541 }542 543 #if 0544 void flush_workqueue(struct workqueue_struct *wq)545 {546 if (0 /* wq->task == current */) {547 run_workqueue(wq);548 } else {549 wait_queue_t wait;550 551 init_waitqueue_entry(&wait, current);552 set_current_state(TASK_UNINTERRUPTIBLE);553 spin_lock_irq(&wq->lock);554 add_wait_queue(&wq->work_done, &wait);555 while (!list_empty(&wq->worklist)) {556 spin_unlock_irq(&wq->lock);557 schedule();558 spin_lock_irq(&wq->lock);559 }560 remove_wait_queue(&wq->work_done, &wait);561 spin_unlock_irq(&wq->lock);562 }563 }564 #endif565 566 522 void destroy_workqueue(struct workqueue_struct *wq) 567 523 { -
GPL/trunk/alsa-kernel/core/pcm_native.c
r77 r124 25 25 #include <sound/pcm.h> 26 26 #include <sound/pcm_params.h> 27 #include <sound/timer.h> 27 28 #include <sound/minors.h> 28 29 #include <linux/file.h> -
GPL/trunk/alsa-kernel/core/sgbuf.c
r32 r124 27 27 #define SGBUF_TBL_ALIGN 32 28 28 #define sgbuf_align_table(tbl) ((((tbl) + SGBUF_TBL_ALIGN - 1) / SGBUF_TBL_ALIGN) * SGBUF_TBL_ALIGN) 29 30 /* set up the page table from the given vmalloc'ed buffer pointer.31 * return a negative error if the page is out of the pci address mask.32 */33 static int store_page_tables(struct snd_sg_buf *sgbuf, void *vmaddr, unsigned int pages)34 {35 unsigned int i;36 37 sgbuf->pages = 0;38 DebugInt3();39 for (i = 0; i < pages; i++) {40 struct page *page;41 void *ptr;42 dma_addr_t addr;43 ptr = (void*)virt_to_phys((void*)((char*)vmaddr + (i << PAGE_SHIFT)));44 // ptr = get_vmalloc_addr(vmaddr + (i << PAGE_SHIFT));45 addr = virt_to_bus(ptr);46 page = virt_to_page((int)ptr);47 #ifdef DEBUG48 dprintf(("virt mem: %x, phys: %x, addr: %x, page: %x",(char*)vmaddr, (char*)ptr, addr, page));49 #endif50 sgbuf->table[i].buf = ptr;51 sgbuf->table[i].addr = addr;52 sgbuf->page_table[i] = page;53 SetPageReserved(page);54 sgbuf->pages++;55 }56 return 0;57 }58 29 59 30 /* -
GPL/trunk/include/linux/proc_fs.h
r32 r124 191 191 extern void proc_device_tree_init(void); 192 192 193 struct proc_dir_entry *create_proc_read_entry(const char *name, 194 mode_t mode, struct proc_dir_entry *base, 195 read_proc_t *read_proc, void * data); 193 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 194 mode_t mode, struct proc_dir_entry *base, 195 read_proc_t *read_proc, void * data) 196 { 197 struct proc_dir_entry *res=create_proc_entry(name,mode,base); 198 if (res) { 199 res->read_proc=read_proc; 200 res->data=data; 201 } 202 return res; 203 } 204 196 205 struct proc_dir_entry *create_proc_info_entry(const char *name, 197 206 mode_t mode, struct proc_dir_entry *base, get_info_t *get_info); … … 215 224 extern inline void proc_tty_unregister_driver(struct tty_driver *driver) {}; 216 225 217 st ruct proc_dir_entry *create_proc_read_entry(const char *name,226 static inline struct proc_dir_entry *create_proc_read_entry(const char *name, 218 227 mode_t mode, struct proc_dir_entry *base, 219 read_proc_t *read_proc, void * data) ;228 read_proc_t *read_proc, void * data) { return NULL; } 220 229 struct proc_dir_entry *create_proc_info_entry(const char *name, 221 230 mode_t mode, struct proc_dir_entry *base, get_info_t *get_info);
Note:
See TracChangeset
for help on using the changeset viewer.