- Timestamp:
- Jun 8, 2009, 11:51:32 AM (16 years ago)
- Location:
- GPL/trunk
- Files:
-
- 1 added
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk/alsa-kernel/core/control.c
r426 r445 1410 1410 #endif 1411 1411 { 1412 #ifndef TARGET_OS21413 1412 .owner = THIS_MODULE, 1414 #endif1415 1413 .read = snd_ctl_read, 1416 1414 .open = snd_ctl_open, -
GPL/trunk/alsa-kernel/core/hwdep.c
r426 r445 268 268 } 269 269 270 #ifndef TARGET_OS2x271 270 static int snd_hwdep_mmap(struct file * file, struct vm_area_struct * vma) 272 271 { … … 276 275 return -ENXIO; 277 276 } 278 #endif 277 279 278 static int snd_hwdep_control_ioctl(struct snd_card *card, 280 279 struct snd_ctl_file * control, … … 350 349 #endif 351 350 { 352 #ifndef TARGET_OS2353 351 .owner = THIS_MODULE, 354 #endif355 352 .llseek = snd_hwdep_llseek, 356 353 .read = snd_hwdep_read, … … 365 362 .ioctl = snd_hwdep_ioctl_old, 366 363 #endif 367 #ifndef TARGET_OS2x368 364 .mmap = snd_hwdep_mmap, 369 #endif370 365 }; 371 366 -
GPL/trunk/alsa-kernel/core/info.c
r426 r445 172 172 data = file->private_data; 173 173 entry = data->entry; 174 #ifndef TARGET_OS2175 174 lock_kernel(); 176 #endif177 175 switch (entry->content) { 178 176 case SNDRV_INFO_CONTENT_TEXT: … … 203 201 ret = -ENXIO; 204 202 out: 205 #ifndef TARGET_OS2206 203 unlock_kernel(); 207 #endif208 204 return ret; 209 205 } … … 528 524 static const struct file_operations snd_info_entry_operations = 529 525 { 530 #ifndef TARGET_OS2531 526 .owner = THIS_MODULE, 532 #endif533 527 .llseek = snd_info_entry_llseek, 534 528 .read = snd_info_entry_read, -
GPL/trunk/alsa-kernel/core/init.c
r426 r445 344 344 #endif 345 345 { 346 #ifndef TARGET_OS2347 346 .owner = THIS_MODULE, 348 #endif349 347 .llseek = snd_disconnect_llseek, 350 348 .read = snd_disconnect_read, -
GPL/trunk/alsa-kernel/core/oss/mixer_oss.c
r426 r445 36 36 MODULE_DESCRIPTION("Mixer OSS emulation for ALSA."); 37 37 MODULE_LICENSE("GPL"); 38 #ifndef TARGET_OS239 38 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MIXER); 40 #endif41 39 42 40 static int snd_mixer_oss_open(struct inode *inode, struct file *file) … … 412 410 static const struct file_operations snd_mixer_oss_f_ops = 413 411 { 414 #ifndef TARGET_OS2415 412 .owner = THIS_MODULE, 416 #endif417 413 .open = snd_mixer_oss_open, 418 414 .release = snd_mixer_oss_release, -
GPL/trunk/alsa-kernel/core/oss/pcm_oss.c
r426 r445 61 61 module_param(nonblock_open, bool, 0644); 62 62 MODULE_PARM_DESC(nonblock_open, "Don't block opening busy PCM devices."); 63 #ifndef TARGET_OS264 63 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM); 65 64 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_PCM1); 66 #endif67 65 68 66 extern int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg); … … 2996 2994 #endif 2997 2995 { 2998 #ifndef TARGET_OS22999 2996 .owner = THIS_MODULE, 3000 #endif3001 2997 .read = snd_pcm_oss_read, 3002 2998 .write = snd_pcm_oss_write, -
GPL/trunk/alsa-kernel/core/pcm_native.c
r426 r445 3276 3276 int err = -ENXIO; 3277 3277 3278 #ifndef TARGET_OS23279 3278 lock_kernel(); 3280 #endif3281 3279 pcm_file = file->private_data; 3282 3280 substream = pcm_file->substream; … … 3286 3284 err = fasync_helper(fd, file, on, &runtime->fasync); 3287 3285 out: 3288 #ifndef TARGET_OS23289 3286 unlock_kernel(); 3290 #endif3291 3287 return err; 3292 3288 } … … 3447 3443 #endif 3448 3444 { 3449 #ifndef TARGET_OS23450 3445 .owner = THIS_MODULE, 3451 #endif3452 3446 .write = snd_pcm_write, 3453 3447 #ifdef SND_PCM_USE_AIO … … 3474 3468 }, 3475 3469 { 3476 #ifndef TARGET_OS23477 3470 .owner = THIS_MODULE, 3478 #endif3479 3471 .read = snd_pcm_read, 3480 3472 #ifdef SND_PCM_USE_AIO -
GPL/trunk/alsa-kernel/core/rawmidi.c
r426 r445 1407 1407 #endif 1408 1408 { 1409 #ifndef TARGET_OS21410 1409 .owner = THIS_MODULE, 1411 #endif1412 1410 .read = snd_rawmidi_read, 1413 1411 .write = snd_rawmidi_write, -
GPL/trunk/alsa-kernel/core/seq/oss/seq_oss.c
r399 r445 37 37 MODULE_LICENSE("GPL"); 38 38 /* Takashi says this is really only for sound-service-0-, but this is OK. */ 39 #ifndef TARGET_OS240 39 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_SEQUENCER); 41 40 MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC); 42 #endif43 41 44 42 #ifdef SNDRV_SEQ_OSS_DEBUG … … 226 224 static const struct file_operations seq_oss_f_ops = 227 225 { 228 #ifndef TARGET_OS2229 226 .owner = THIS_MODULE, 230 #endif231 227 .read = odev_read, 232 228 .write = odev_write, -
GPL/trunk/alsa-kernel/core/seq/oss/seq_oss_init.c
r399 r445 21 21 */ 22 22 23 #ifdef TARGET_OS224 #include <sound/initval.h>25 #endif26 23 #include "seq_oss_device.h" 27 24 #include "seq_oss_synth.h" -
GPL/trunk/alsa-kernel/core/seq/seq_clientmgr.c
r399 r445 2223 2223 { 2224 2224 int err; 2225 #ifndef TARGET_OS22226 2225 unlock_kernel(); 2227 #endif2228 2226 err = snd_seq_ioctl(file, cmd, arg); 2229 #ifndef TARGET_OS22230 2227 lock_kernel(); 2231 #endif2232 2228 return err; 2233 2229 } … … 2571 2567 #endif 2572 2568 { 2573 #ifndef TARGET_OS22574 2569 .owner = THIS_MODULE, 2575 #endif2576 2570 .read = snd_seq_read, 2577 2571 .write = snd_seq_write, -
GPL/trunk/alsa-kernel/core/seq/seq_memory.c
r399 r445 434 434 break; 435 435 } 436 #ifndef TARGET_OS2437 436 schedule_timeout_uninterruptible(1); 438 #else439 set_current_state(TASK_UNINTERRUPTIBLE);440 schedule_timeout(1);441 #endif442 437 max_count--; 443 438 } -
GPL/trunk/alsa-kernel/core/sound.c
r410 r445 181 181 int ret; 182 182 183 #ifndef TARGET_OS2184 183 lock_kernel(); 185 #endif186 184 ret = __snd_open(inode, file); 187 #ifndef TARGET_OS2188 185 unlock_kernel(); 189 #endif190 186 return ret; 191 187 } … … 197 193 #endif 198 194 { 199 #ifndef TARGET_OS2200 195 .owner = THIS_MODULE, 201 #endif202 196 .open = snd_open 203 197 }; -
GPL/trunk/alsa-kernel/core/timer.c
r426 r445 1949 1949 #endif 1950 1950 { 1951 #ifndef TARGET_OS21952 1951 .owner = THIS_MODULE, 1953 #endif1954 1952 .read = snd_timer_user_read, 1955 1953 .open = snd_timer_user_open, -
GPL/trunk/alsa-kernel/include/sound/config.h
r442 r445 62 62 #include <linux/init.h> 63 63 #include <linux/lockdep.h> 64 #include <linux/smp_lock.h> 64 65 #include "compat_22.h" 65 66 -
GPL/trunk/alsa-kernel/include/sound/minors.h
r399 r445 103 103 #define SNDRV_OSS_DEVICE_TYPE_MUSIC 6 104 104 105 #ifndef TARGET_OS2 105 106 #define MODULE_ALIAS_SNDRV_MINOR(type) \ 106 107 MODULE_ALIAS("sound-service-?-" __stringify(type)) 107 108 #else 109 #define MODULE_ALIAS_SNDRV_MINOR(a) 110 #endif 108 111 #endif 109 112 -
GPL/trunk/alsa-kernel/pci/bt87x.c
r410 r445 22 22 */ 23 23 24 #ifdef TARGET_OS225 #include <asm/bitops.h>26 #endif27 24 #include <linux/init.h> 28 25 #include <linux/interrupt.h> -
GPL/trunk/alsa-kernel/pci/hda/hda_intel.c
r434 r445 1938 1938 printk(KERN_ERR "hda-intel: unable to grab IRQ %d, " 1939 1939 "disabling device\n", chip->pci->irq); 1940 #ifndef TARGE t_OS21940 #ifndef TARGET_OS2 1941 1941 if (do_disconnect) 1942 1942 snd_card_disconnect(chip->card); -
GPL/trunk/alsa-kernel/pci/hda/makefile.os2
r433 r445 16 16 FILE2 = patch_realtek.obj patch_cmedia.obj patch_analog.obj patch_sigmatel.obj 17 17 FILE3 = patch_si3054.obj patch_atihdmi.obj patch_conexant.obj patch_via.obj 18 FILE4 = 18 FILE4 = 19 19 FILE5 = 20 20 FILE6 = -
GPL/trunk/alsa-kernel/pci/intel8x0.c
r426 r445 41 41 /* for 440MX workaround */ 42 42 #include <asm/pgtable.h> 43 #ifndef TARGET_OS244 43 #include <asm/cacheflush.h> 45 #endif46 44 47 45 MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>"); -
GPL/trunk/alsa-kernel/pci/ymfpci/ymfpci_main.c
r426 r445 85 85 if ((snd_ymfpci_readw(chip, reg) & 0x8000) == 0) 86 86 return 0; 87 #ifndef TARGET_OS288 87 schedule_timeout_uninterruptible(1); 89 #else90 set_current_state(TASK_UNINTERRUPTIBLE);91 schedule_timeout(1);92 #endif93 88 } while (time_before(jiffies, end_time)); 94 89 snd_printk(KERN_ERR "codec_ready: codec %i is not ready [0x%x]\n", secondary, snd_ymfpci_readw(chip, reg)); … … 794 789 add_wait_queue(&chip->interrupt_sleep, &wait); 795 790 atomic_inc(&chip->interrupt_sleep_count); 796 #ifndef TARGET_OS2797 791 schedule_timeout_uninterruptible(msecs_to_jiffies(50)); 798 #else799 set_current_state(TASK_UNINTERRUPTIBLE);800 schedule_timeout(msecs_to_jiffies(50));801 #endif802 803 792 remove_wait_queue(&chip->interrupt_sleep, &wait); 804 793 } -
GPL/trunk/include/linux/fs.h
r441 r445 233 233 234 234 struct file_operations { 235 struct module *owner; 235 236 loff_t (*llseek) (struct file *, loff_t, int); 236 237 int (*read) (struct file *, char *, size_t, loff_t *); -
GPL/trunk/include/linux/smp_lock.h
r305 r445 3 3 #ifndef _LINUX_SMP_LOCK_H 4 4 #define _LINUX_SMP_LOCK_H 5 5 #define lock_kernel() do { } while(0) 6 #define unlock_kernel() do { } while(0) 6 7 #endif /* _LINUX_SMP_LOCK_H */ -
GPL/trunk/lib32/memory.cpp
r340 r445 33 33 #include <dbgos2.h> 34 34 #include <stacktoflat.h> 35 #include <limits.h> 35 36 #ifdef KEE 36 37 #include <kee.h> … … 645 646 //****************************************************************************** 646 647 //****************************************************************************** 647 648 } 648 void *kzalloc(size_t size, unsigned int flags) 649 { 650 void *ret; 651 ret = _kmalloc(size, flags); 652 if (ret) 653 memset(ret, 0, size); 654 return ret; 655 } 656 //****************************************************************************** 657 //****************************************************************************** 658 void *kcalloc(size_t n, size_t size, unsigned int flags) 659 { 660 if (n != 0 && size > INT_MAX / n) 661 return NULL; 662 return kzalloc(n * size, flags); 663 } 664 //****************************************************************************** 665 //****************************************************************************** 666 667 } -
GPL/trunk/lib32/misc.c
r305 r445 36 36 #include <linux\utsname.h> 37 37 #include <linux\module.h> 38 #include <linux/workqueue.h> 39 #include <linux/firmware.h> 38 40 #include <dbgos2.h> 39 41 #include <printfos2.h> … … 219 221 //****************************************************************************** 220 222 //****************************************************************************** 223 static void __x_queue_work(struct workqueue_struct *wq, struct work_struct *work) 224 { 225 unsigned long flags; 226 227 spin_lock_irqsave(&wq->lock, flags); 228 work->wq_data = wq; 229 list_add_tail(&work->entry, &wq->worklist); 230 wake_up(&wq->more_work); 231 spin_unlock_irqrestore(&wq->lock, flags); 232 } 233 //****************************************************************************** 234 //****************************************************************************** 235 int queue_work(struct workqueue_struct *wq, struct work_struct *work) 236 { 237 if (!test_and_set_bit(0, &work->pending)) { 238 __x_queue_work(wq, work); 239 return 1; 240 } 241 return 0; 242 } 243 //****************************************************************************** 244 //****************************************************************************** 245 void flush_workqueue(struct workqueue_struct *wq) 246 { 247 if (wq->task == current) { 248 run_workqueue(wq); 249 } else { 250 wait_queue_t wait; 251 252 init_waitqueue_entry(&wait, current); 253 set_current_state(TASK_UNINTERRUPTIBLE); 254 spin_lock_irq(&wq->lock); 255 add_wait_queue(&wq->work_done, &wait); 256 while (!list_empty(&wq->worklist)) { 257 spin_unlock_irq(&wq->lock); 258 schedule(); 259 spin_lock_irq(&wq->lock); 260 } 261 set_current_state(TASK_RUNNING); 262 remove_wait_queue(&wq->work_done, &wait); 263 spin_unlock_irq(&wq->lock); 264 } 265 } 266 //****************************************************************************** 267 //****************************************************************************** 268 static void run_workqueue(struct workqueue_struct *wq) 269 { 270 unsigned long flags; 271 272 spin_lock_irqsave(&wq->lock, flags); 273 while (!list_empty(&wq->worklist)) { 274 struct work_struct *work = list_entry(wq->worklist.next, 275 struct work_struct, entry); 276 void (*f) (void *) = work->func; 277 void *data = work->data; 278 279 list_del_init(wq->worklist.next); 280 spin_unlock_irqrestore(&wq->lock, flags); 281 clear_bit(0, &work->pending); 282 f(data); 283 spin_lock_irqsave(&wq->lock, flags); 284 wake_up(&wq->work_done); 285 } 286 spin_unlock_irqrestore(&wq->lock, flags); 287 } 288 //****************************************************************************** 289 //****************************************************************************** 290 struct workqueue_struct *create_workqueue(const char *name) 291 { 292 struct workqueue_struct *wq; 293 294 BUG_ON(strlen(name) > 10); 295 296 wq = kmalloc(sizeof(*wq), GFP_KERNEL); 297 if (!wq) 298 return NULL; 299 memset(wq, 0, sizeof(*wq)); 300 301 spin_lock_init(&wq->lock); 302 INIT_LIST_HEAD(&wq->worklist); 303 init_waitqueue_head(&wq->more_work); 304 init_waitqueue_head(&wq->work_done); 305 #ifndef TARGET_OS2 306 init_completion(&wq->thread_exited); 307 wq->name = name; 308 wq->task_pid = kernel_thread(xworker_thread, wq, 0); 309 if (wq->task_pid < 0) { 310 printk(KERN_ERR "snd: failed to start thread %s\n", name); 311 snd_compat_destroy_workqueue(wq); 312 wq = NULL; 313 } 314 wq->task = find_task_by_pid(wq->task_pid); 315 #endif 316 return wq; 317 } 318 //****************************************************************************** 319 //****************************************************************************** 320 void destroy_workqueue(struct workqueue_struct *wq) 321 { 322 #ifndef TARGET_OS2 323 snd_compat_flush_workqueue(wq); 324 kill_proc(wq->task_pid, SIGKILL, 1); 325 if (wq->task_pid >= 0) 326 wait_for_completion(&wq->thread_exited); 327 #endif 328 kfree(wq); 329 } 330 331 //****************************************************************************** 332 //****************************************************************************** 333 char *kstrdup(const char *s, unsigned int __nocast gfp_flags) 334 { 335 int len; 336 char *buf; 337 338 if (!s) return NULL; 339 340 len = strlen(s) + 1; 341 buf = kmalloc(len, gfp_flags); 342 if (buf) 343 memcpy(buf, s, len); 344 return buf; 345 } 346 //****************************************************************************** 347 //****************************************************************************** 348 int mod_firmware_load(const char *fn, char **fp) 349 { 350 return 0; 351 } 352 //****************************************************************************** 353 //****************************************************************************** 354 static int snd_try_load_firmware(const char *path, const char *name, 355 struct firmware *firmware) 356 { 357 char filename[30 + FIRMWARE_NAME_MAX]; 358 359 sprintf(filename, "%s/%s", path, name); 360 firmware->size = mod_firmware_load(filename, (char **)&firmware->data); 361 if (firmware->size) 362 printk(KERN_INFO "Loaded '%s'.", filename); 363 return firmware->size; 364 } 365 //****************************************************************************** 366 //****************************************************************************** 367 int request_firmware(const struct firmware **fw, const char *name, 368 struct device *device) 369 { 370 struct firmware *firmware; 371 372 *fw = NULL; 373 firmware = kmalloc(sizeof *firmware, GFP_KERNEL); 374 if (!firmware) 375 return -ENOMEM; 376 if (!snd_try_load_firmware("/lib/firmware", name, firmware) && 377 !snd_try_load_firmware("/lib/hotplug/firmware", name, firmware) && 378 !snd_try_load_firmware("/usr/lib/hotplug/firmware", name, firmware)) { 379 kfree(firmware); 380 return -EIO; 381 } 382 *fw = firmware; 383 return 0; 384 } 385 //****************************************************************************** 386 //****************************************************************************** 387 void release_firmware(const struct firmware *fw) 388 { 389 if (fw) { 390 vfree(fw->data); 391 kfree(fw); 392 } 393 } 394 //****************************************************************************** 395 //****************************************************************************** 396 void *memdup_user(void __user *src, size_t len) 397 { 398 void *p = kmalloc(len, GFP_KERNEL); 399 if (!p) 400 return ERR_PTR(-ENOMEM); 401 if (copy_from_user(p, src, len)) { 402 kfree(p); 403 return ERR_PTR(-EFAULT); 404 } 405 return p; 406 } 407 //****************************************************************************** 408 //****************************************************************************** -
GPL/trunk/lib32/timer.c
r76 r445 127 127 //****************************************************************************** 128 128 //****************************************************************************** 129 #include <linux/delay.h> 130 void msleep(unsigned int msecs) 131 { 132 unsigned long timeout = ((msecs) * HZ + 999) / 1000; 129 133 134 while (timeout) { 135 set_current_state(TASK_UNINTERRUPTIBLE); 136 timeout = schedule_timeout(timeout); 137 } 138 } 139 140 //****************************************************************************** 141 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.