Changeset 102 for GPL/branches
- Timestamp:
- May 12, 2007, 6:46:46 AM (18 years ago)
- Location:
- GPL/branches/alsa-resync1/alsa-kernel/include/sound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/alsa-resync1/alsa-kernel/include/sound/adriver.h
r98 r102 53 53 #endif 54 54 55 #ifndef __iomem 56 #define __iomem 57 #endif 58 55 59 #ifdef LINUX_2_2 56 60 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 18) … … 107 111 return (struct proc_dir_entry *) inode->u.generic_ip; 108 112 } 113 #endif 114 #ifndef cond_resched 115 #define cond_resched() \ 116 do { \ 117 if (1) { \ 118 set_current_state(TASK_RUNNING); \ 119 schedule(); \ 120 } \ 121 } while (0) 109 122 #endif 110 123 #include <asm/io.h> … … 166 179 #endif 167 180 181 #define IRQ_NONE (0) /*void*/ 182 #define IRQ_HANDLED (1) /*void*/ 183 #define IRQ_RETVAL(x) ((x) != 0) /*void*/ 184 typedef int irqreturn_t; 185 186 struct work_struct { 187 unsigned long pending; 188 struct list_head entry; 189 void (*func)(void *); 190 void *data; 191 void *wq_data; 192 struct timer_list timer; 193 }; 194 #define INIT_WORK(_work, _func, _data) \ 195 do { \ 196 (_work)->func = _func; \ 197 (_work)->data = _data; \ 198 init_timer(&(_work)->timer); \ 199 } while (0) 200 #define __WORK_INITIALIZER(n, f, d) { \ 201 .func = (f), \ 202 .data = (d), \ 203 } 204 #define DECLARE_WORK(n, f, d) \ 205 struct work_struct n = __WORK_INITIALIZER(n, f, d) 206 int snd_compat_schedule_work(struct work_struct *work); 207 #define schedule_work(w) snd_compat_schedule_work(w) 208 209 #ifndef PCI_D0 210 #define PCI_D0 0 211 #define PCI_D1 1 212 #define PCI_D2 2 213 #define PCI_D3hot 3 214 #define PCI_D3cold 4 215 #define pci_choose_state(pci,state) ((state) ? PCI_D3hot : PCI_D0) 216 #endif 217 218 /* wrapper for getnstimeofday() 219 * it's needed for recent 2.6 kernels, too, due to lack of EXPORT_SYMBOL 220 */ 221 #define getnstimeofday(x) do { \ 222 struct timeval __x; \ 223 do_gettimeofday(&__x); \ 224 (x)->tv_sec = __x.tv_sec; \ 225 (x)->tv_nsec = __x.tv_usec * 1000; \ 226 } while (0) 227 168 228 #endif /* __SOUND_LOCAL_DRIVER_H */ -
GPL/branches/alsa-resync1/alsa-kernel/include/sound/driver.h
r95 r102 46 46 #include <linux/module.h> 47 47 48 #ifndef __iomem49 #define __iomem50 #endif51 52 #ifndef cond_resched53 #define cond_resched() \54 do { \55 if (1) { \56 set_current_state(TASK_RUNNING); \57 schedule(); \58 } \59 } while (0)60 #endif61 62 #define IRQ_NONE (0) /*void*/63 #define IRQ_HANDLED (1) /*void*/64 #define IRQ_RETVAL(x) ((x) != 0) /*void*/65 typedef int irqreturn_t;66 #ifndef PCI_D067 #define PCI_D0 068 #define PCI_D1 169 #define PCI_D2 270 #define PCI_D3hot 371 #define PCI_D3cold 472 #define pci_choose_state(pci,state) ((state) ? PCI_D3hot : PCI_D0)73 #endif74 75 /* wrapper for getnstimeofday()76 * it's needed for recent 2.6 kernels, too, due to lack of EXPORT_SYMBOL77 */78 #define getnstimeofday(x) do { \79 struct timeval __x; \80 do_gettimeofday(&__x); \81 (x)->tv_sec = __x.tv_sec; \82 (x)->tv_nsec = __x.tv_usec * 1000; \83 } while (0)84 85 struct work_struct {86 unsigned long pending;87 struct list_head entry;88 void (*func)(void *);89 void *data;90 void *wq_data;91 struct timer_list timer;92 };93 94 #define INIT_WORK(_work, _func, _data) \95 do { \96 (_work)->func = _func; \97 (_work)->data = _data; \98 init_timer(&(_work)->timer); \99 } while (0)100 #define __WORK_INITIALIZER(n, f, d) { \101 .func = (f), \102 .data = (d), \103 }104 #define DECLARE_WORK(n, f, d) \105 struct work_struct n = __WORK_INITIALIZER(n, f, d)106 int snd_compat_schedule_work(struct work_struct *work);107 #define schedule_work(w) snd_compat_schedule_work(w)108 109 48 /* 110 49 * ========================================================================== … … 152 91 * Temporary hack, until linux/init.h is fixed. 153 92 */ 154 155 93 #include <linux/init.h> 156 94 #ifndef __devexit_p
Note:
See TracChangeset
for help on using the changeset viewer.
