Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* 'staging-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6:
zcache: Fix build error when sysfs is not defined
zcache: Use div_u64 for 64-bit division
staging:rts_pstor: fix thread synchronization flow
drivers:staging:solo6x10:add the missed slab.h
staging: zcache: include module.h for MODULE_LICENSE
drivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference
Staging: Add clk API note to nvec/TODO
drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c: adjust array index
staging: more missing slab.h inclusions
drivers/staging/solo6x10/p2m.c needs slab.h
drivers/staging/solo6x10/core.c needs slab.h
drivers/staging/dt3155v4l/dt3155v4l.c needs slab.h
drivers/staging/speakup/devsynth.c: fix "buffer size is not provably correct" error
Staging: iio: add some unlocks to raw_read() functions
staging: ft1000_proc needs asm/io.h for inw/outw on sparc
staging: rtl8192u: declare MODULE_FIRMWARE
gma500: Fix clashes with DRM updates
staging: zcache: module is GPL
staging: fix zcache building

+115 -99
+1 -1
drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
··· 812 812 for(count = 0; count < Patch_Count; count++) { 813 813 814 814 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Freeing Patch Buffer %d \r\n",count)); 815 - kfree(RamPatch[Patch_Count].Data); 815 + kfree(RamPatch[count].Data); 816 816 } 817 817 818 818 for(count = 0; count < Tag_Count; count++) {
+1
drivers/staging/dt3155v4l/dt3155v4l.c
··· 22 22 #include <linux/stringify.h> 23 23 #include <linux/delay.h> 24 24 #include <linux/kthread.h> 25 + #include <linux/slab.h> 25 26 #include <media/v4l2-dev.h> 26 27 #include <media/v4l2-ioctl.h> 27 28 #include <media/videobuf2-dma-contig.h>
+1
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c
··· 22 22 #include <linux/string.h> 23 23 #include <linux/vmalloc.h> 24 24 #include <linux/netdevice.h> 25 + #include <asm/io.h> 25 26 #include <asm/uaccess.h> 26 27 #include "ft1000.h" 27 28
+2 -2
drivers/staging/hv/blkvsc_drv.c
··· 325 325 326 326 page_buf = alloc_page(GFP_KERNEL); 327 327 if (!page_buf) { 328 - kmem_cache_free(blkvsc_req->dev->request_pool, blkvsc_req); 328 + kmem_cache_free(blkdev->request_pool, blkvsc_req); 329 329 return -ENOMEM; 330 330 } 331 331 ··· 422 422 423 423 __free_page(page_buf); 424 424 425 - kmem_cache_free(blkvsc_req->dev->request_pool, blkvsc_req); 425 + kmem_cache_free(blkdev->request_pool, blkvsc_req); 426 426 427 427 return ret; 428 428 }
+6 -2
drivers/staging/iio/accel/adis16203_core.c
··· 311 311 mutex_lock(&indio_dev->mlock); 312 312 addr = adis16203_addresses[chan->address][0]; 313 313 ret = adis16203_spi_read_reg_16(indio_dev, addr, &val16); 314 - if (ret) 314 + if (ret) { 315 + mutex_unlock(&indio_dev->mlock); 315 316 return ret; 317 + } 316 318 317 319 if (val16 & ADIS16203_ERROR_ACTIVE) { 318 320 ret = adis16203_check_status(indio_dev); 319 - if (ret) 321 + if (ret) { 322 + mutex_unlock(&indio_dev->mlock); 320 323 return ret; 324 + } 321 325 } 322 326 val16 = val16 & ((1 << chan->scan_type.realbits) - 1); 323 327 if (chan->scan_type.sign == 's')
+6 -2
drivers/staging/iio/accel/adis16204_core.c
··· 341 341 mutex_lock(&indio_dev->mlock); 342 342 addr = adis16204_addresses[chan->address][0]; 343 343 ret = adis16204_spi_read_reg_16(indio_dev, addr, &val16); 344 - if (ret) 344 + if (ret) { 345 + mutex_unlock(&indio_dev->mlock); 345 346 return ret; 347 + } 346 348 347 349 if (val16 & ADIS16204_ERROR_ACTIVE) { 348 350 ret = adis16204_check_status(indio_dev); 349 - if (ret) 351 + if (ret) { 352 + mutex_unlock(&indio_dev->mlock); 350 353 return ret; 354 + } 351 355 } 352 356 val16 = val16 & ((1 << chan->scan_type.realbits) - 1); 353 357 if (chan->scan_type.sign == 's')
+6 -2
drivers/staging/iio/accel/adis16209_core.c
··· 337 337 mutex_lock(&indio_dev->mlock); 338 338 addr = adis16209_addresses[chan->address][0]; 339 339 ret = adis16209_spi_read_reg_16(indio_dev, addr, &val16); 340 - if (ret) 340 + if (ret) { 341 + mutex_unlock(&indio_dev->mlock); 341 342 return ret; 343 + } 342 344 343 345 if (val16 & ADIS16209_ERROR_ACTIVE) { 344 346 ret = adis16209_check_status(indio_dev); 345 - if (ret) 347 + if (ret) { 348 + mutex_unlock(&indio_dev->mlock); 346 349 return ret; 350 + } 347 351 } 348 352 val16 = val16 & ((1 << chan->scan_type.realbits) - 1); 349 353 if (chan->scan_type.sign == 's')
+6 -2
drivers/staging/iio/accel/adis16240_core.c
··· 370 370 mutex_lock(&indio_dev->mlock); 371 371 addr = adis16240_addresses[chan->address][0]; 372 372 ret = adis16240_spi_read_reg_16(indio_dev, addr, &val16); 373 - if (ret) 373 + if (ret) { 374 + mutex_unlock(&indio_dev->mlock); 374 375 return ret; 376 + } 375 377 376 378 if (val16 & ADIS16240_ERROR_ACTIVE) { 377 379 ret = adis16240_check_status(indio_dev); 378 - if (ret) 380 + if (ret) { 381 + mutex_unlock(&indio_dev->mlock); 379 382 return ret; 383 + } 380 384 } 381 385 val16 = val16 & ((1 << chan->scan_type.realbits) - 1); 382 386 if (chan->scan_type.sign == 's')
+6 -2
drivers/staging/iio/gyro/adis16260_core.c
··· 446 446 mutex_lock(&indio_dev->mlock); 447 447 addr = adis16260_addresses[chan->address][0]; 448 448 ret = adis16260_spi_read_reg_16(indio_dev, addr, &val16); 449 - if (ret) 449 + if (ret) { 450 + mutex_unlock(&indio_dev->mlock); 450 451 return ret; 452 + } 451 453 452 454 if (val16 & ADIS16260_ERROR_ACTIVE) { 453 455 ret = adis16260_check_status(indio_dev); 454 - if (ret) 456 + if (ret) { 457 + mutex_unlock(&indio_dev->mlock); 455 458 return ret; 459 + } 456 460 } 457 461 val16 = val16 & ((1 << chan->scan_type.realbits) - 1); 458 462 if (chan->scan_type.sign == 's')
+4 -2
drivers/staging/nvec/TODO
··· 4 4 - add compile as module support 5 5 - move nvec devices to mfd cells? 6 6 - adjust to kernel style 7 - 8 - 7 + - fix clk usage 8 + should not be using clk_get_sys(), but clk_get(&pdev->dev, conn) 9 + where conn is either NULL if the device only has one clock, or 10 + the device specific name if it has multiple clocks.
+3 -6
drivers/staging/rtl8192u/r819xU_firmware.c
··· 399 399 400 400 } 401 401 402 - 403 - 404 - 405 - 406 - 407 - 402 + MODULE_FIRMWARE("RTL8192U/boot.img"); 403 + MODULE_FIRMWARE("RTL8192U/main.img"); 404 + MODULE_FIRMWARE("RTL8192U/data.img"); 408 405
+46 -71
drivers/staging/rts_pstor/rtsx.c
··· 66 66 module_param(msi_en, int, S_IRUGO | S_IWUSR); 67 67 MODULE_PARM_DESC(msi_en, "enable msi"); 68 68 69 - /* These are used to make sure the module doesn't unload before all the 70 - * threads have exited. 71 - */ 72 - static atomic_t total_threads = ATOMIC_INIT(0); 73 - static DECLARE_COMPLETION(threads_gone); 74 - 75 69 static irqreturn_t rtsx_interrupt(int irq, void *dev_id); 76 70 77 71 /*********************************************************************** ··· 186 192 /* enqueue the command and wake up the control thread */ 187 193 srb->scsi_done = done; 188 194 chip->srb = srb; 189 - up(&(dev->sema)); 195 + complete(&dev->cmnd_ready); 190 196 191 197 return 0; 192 198 } ··· 469 475 current->flags |= PF_NOFREEZE; 470 476 471 477 for (;;) { 472 - if (down_interruptible(&dev->sema)) 478 + if (wait_for_completion_interruptible(&dev->cmnd_ready)) 473 479 break; 474 480 475 481 /* lock the device pointers */ ··· 551 557 mutex_unlock(&dev->dev_mutex); 552 558 } /* for (;;) */ 553 559 554 - scsi_host_put(host); 555 - 556 560 /* notify the exit routine that we're actually exiting now 557 561 * 558 562 * complete()/wait_for_completion() is similar to up()/down(), ··· 565 573 * This is important in preemption kernels, which transfer the flow 566 574 * of execution immediately upon a complete(). 567 575 */ 568 - complete_and_exit(&threads_gone, 0); 576 + complete_and_exit(&dev->control_exit, 0); 569 577 } 570 578 571 579 ··· 573 581 { 574 582 struct rtsx_dev *dev = (struct rtsx_dev *)__dev; 575 583 struct rtsx_chip *chip = dev->chip; 576 - struct Scsi_Host *host = rtsx_to_host(dev); 577 584 struct sd_info *sd_card = &(chip->sd_card); 578 585 struct xd_info *xd_card = &(chip->xd_card); 579 586 struct ms_info *ms_card = &(chip->ms_card); ··· 612 621 mutex_unlock(&dev->dev_mutex); 613 622 } 614 623 615 - scsi_host_put(host); 616 - complete_and_exit(&threads_gone, 0); 624 + complete_and_exit(&dev->polling_exit, 0); 617 625 } 618 626 619 627 /* ··· 689 699 { 690 700 printk(KERN_INFO "-- %s\n", __func__); 691 701 692 - if (dev->rtsx_resv_buf) { 693 - dma_free_coherent(&(dev->pci->dev), HOST_CMDS_BUF_LEN, 694 - dev->rtsx_resv_buf, dev->rtsx_resv_buf_addr); 695 - dev->chip->host_cmds_ptr = NULL; 696 - dev->chip->host_sg_tbl_ptr = NULL; 697 - } 698 - 699 - pci_disable_device(dev->pci); 700 - pci_release_regions(dev->pci); 701 - 702 - if (dev->irq > 0) { 703 - free_irq(dev->irq, (void *)dev); 704 - } 705 - if (dev->chip->msi_en) { 706 - pci_disable_msi(dev->pci); 707 - } 708 - 709 702 /* Tell the control thread to exit. The SCSI host must 710 703 * already have been removed so it won't try to queue 711 704 * any more commands. 712 705 */ 713 706 printk(KERN_INFO "-- sending exit command to thread\n"); 714 - up(&dev->sema); 707 + complete(&dev->cmnd_ready); 708 + if (dev->ctl_thread) 709 + wait_for_completion(&dev->control_exit); 710 + if (dev->polling_thread) 711 + wait_for_completion(&dev->polling_exit); 712 + 713 + wait_timeout(200); 714 + 715 + if (dev->rtsx_resv_buf) { 716 + dma_free_coherent(&(dev->pci->dev), RTSX_RESV_BUF_LEN, 717 + dev->rtsx_resv_buf, dev->rtsx_resv_buf_addr); 718 + dev->chip->host_cmds_ptr = NULL; 719 + dev->chip->host_sg_tbl_ptr = NULL; 720 + } 721 + 722 + if (dev->irq > 0) 723 + free_irq(dev->irq, (void *)dev); 724 + if (dev->chip->msi_en) 725 + pci_disable_msi(dev->pci); 726 + if (dev->remap_addr) 727 + iounmap(dev->remap_addr); 728 + 729 + pci_disable_device(dev->pci); 730 + pci_release_regions(dev->pci); 731 + 732 + rtsx_release_chip(dev->chip); 733 + kfree(dev->chip); 715 734 } 716 735 717 736 /* First stage of disconnect processing: stop all commands and remove ··· 738 739 scsi_unlock(host); 739 740 mutex_unlock(&dev->dev_mutex); 740 741 wake_up(&dev->delay_wait); 742 + wait_for_completion(&dev->scanning_done); 741 743 742 744 /* Wait some time to let other threads exist */ 743 745 wait_timeout(100); ··· 793 793 /* Should we unbind if no devices were detected? */ 794 794 } 795 795 796 - scsi_host_put(rtsx_to_host(dev)); 797 - complete_and_exit(&threads_gone, 0); 796 + complete_and_exit(&dev->scanning_done, 0); 798 797 } 799 798 800 799 static void rtsx_init_options(struct rtsx_chip *chip) ··· 940 941 941 942 spin_lock_init(&dev->reg_lock); 942 943 mutex_init(&(dev->dev_mutex)); 943 - sema_init(&(dev->sema), 0); 944 + init_completion(&dev->cmnd_ready); 945 + init_completion(&dev->control_exit); 946 + init_completion(&dev->polling_exit); 944 947 init_completion(&(dev->notify)); 948 + init_completion(&dev->scanning_done); 945 949 init_waitqueue_head(&dev->delay_wait); 946 950 947 951 dev->pci = pci; ··· 994 992 pci_set_master(pci); 995 993 synchronize_irq(dev->irq); 996 994 997 - err = scsi_add_host(host, &pci->dev); 998 - if (err) { 999 - printk(KERN_ERR "Unable to add the scsi host\n"); 1000 - goto errout; 1001 - } 1002 - 1003 995 rtsx_init_chip(dev->chip); 1004 996 1005 997 /* Start up our control thread */ 1006 - th = kthread_create(rtsx_control_thread, dev, CR_DRIVER_NAME); 998 + th = kthread_run(rtsx_control_thread, dev, CR_DRIVER_NAME); 1007 999 if (IS_ERR(th)) { 1008 1000 printk(KERN_ERR "Unable to start control thread\n"); 1009 1001 err = PTR_ERR(th); 1010 1002 goto errout; 1011 1003 } 1004 + dev->ctl_thread = th; 1012 1005 1013 - /* Take a reference to the host for the control thread and 1014 - * count it among all the threads we have launched. Then 1015 - * start it up. */ 1016 - scsi_host_get(rtsx_to_host(dev)); 1017 - atomic_inc(&total_threads); 1018 - wake_up_process(th); 1006 + err = scsi_add_host(host, &pci->dev); 1007 + if (err) { 1008 + printk(KERN_ERR "Unable to add the scsi host\n"); 1009 + goto errout; 1010 + } 1019 1011 1020 1012 /* Start up the thread for delayed SCSI-device scanning */ 1021 1013 th = kthread_create(rtsx_scan_thread, dev, "rtsx-scan"); ··· 1020 1024 goto errout; 1021 1025 } 1022 1026 1023 - /* Take a reference to the host for the scanning thread and 1024 - * count it among all the threads we have launched. Then 1025 - * start it up. */ 1026 - scsi_host_get(rtsx_to_host(dev)); 1027 - atomic_inc(&total_threads); 1028 1027 wake_up_process(th); 1029 1028 1030 1029 /* Start up the thread for polling thread */ 1031 - th = kthread_create(rtsx_polling_thread, dev, "rtsx-polling"); 1030 + th = kthread_run(rtsx_polling_thread, dev, "rtsx-polling"); 1032 1031 if (IS_ERR(th)) { 1033 1032 printk(KERN_ERR "Unable to start the device-polling thread\n"); 1034 1033 quiesce_and_remove_host(dev); 1035 1034 err = PTR_ERR(th); 1036 1035 goto errout; 1037 1036 } 1038 - 1039 - /* Take a reference to the host for the polling thread and 1040 - * count it among all the threads we have launched. Then 1041 - * start it up. */ 1042 - scsi_host_get(rtsx_to_host(dev)); 1043 - atomic_inc(&total_threads); 1044 - wake_up_process(th); 1037 + dev->polling_thread = th; 1045 1038 1046 1039 pci_set_drvdata(pci, dev); 1047 1040 ··· 1092 1107 printk(KERN_INFO "rtsx_exit() called\n"); 1093 1108 1094 1109 pci_unregister_driver(&driver); 1095 - 1096 - /* Don't return until all of our control and scanning threads 1097 - * have exited. Since each thread signals threads_gone as its 1098 - * last act, we have to call wait_for_completion the right number 1099 - * of times. 1100 - */ 1101 - while (atomic_read(&total_threads) > 0) { 1102 - wait_for_completion(&threads_gone); 1103 - atomic_dec(&total_threads); 1104 - } 1105 1110 1106 1111 printk(KERN_INFO "%s module exit\n", CR_DRIVER_NAME); 1107 1112 }
+8 -1
drivers/staging/rts_pstor/rtsx.h
··· 112 112 /* locks */ 113 113 spinlock_t reg_lock; 114 114 115 + struct task_struct *ctl_thread; /* the control thread */ 116 + struct task_struct *polling_thread; /* the polling thread */ 117 + 115 118 /* mutual exclusion and synchronization structures */ 116 - struct semaphore sema; /* to sleep thread on */ 119 + struct completion cmnd_ready; /* to sleep thread on */ 120 + struct completion control_exit; /* control thread exit */ 121 + struct completion polling_exit; /* polling thread exit */ 117 122 struct completion notify; /* thread begin/end */ 123 + struct completion scanning_done; /* wait for scan thread */ 124 + 118 125 wait_queue_head_t delay_wait; /* wait during scan, reset */ 119 126 struct mutex dev_mutex; 120 127
+1
drivers/staging/solo6x10/core.c
··· 21 21 #include <linux/module.h> 22 22 #include <linux/pci.h> 23 23 #include <linux/interrupt.h> 24 + #include <linux/slab.h> 24 25 #include <linux/videodev2.h> 25 26 #include "solo6x10.h" 26 27 #include "tw28.h"
+1
drivers/staging/solo6x10/enc.c
··· 18 18 */ 19 19 20 20 #include <linux/kernel.h> 21 + #include <linux/slab.h> 21 22 #include "solo6x10.h" 22 23 #include "osd-font.h" 23 24
+1
drivers/staging/solo6x10/g723.c
··· 21 21 #include <linux/mempool.h> 22 22 #include <linux/poll.h> 23 23 #include <linux/kthread.h> 24 + #include <linux/slab.h> 24 25 #include <linux/freezer.h> 25 26 #include <sound/core.h> 26 27 #include <sound/initval.h>
+1
drivers/staging/solo6x10/p2m.c
··· 18 18 */ 19 19 20 20 #include <linux/kernel.h> 21 + #include <linux/slab.h> 21 22 #include <linux/scatterlist.h> 22 23 #include "solo6x10.h" 23 24
+1
drivers/staging/solo6x10/solo6x10.h
··· 28 28 #include <linux/list.h> 29 29 #include <linux/wait.h> 30 30 #include <linux/delay.h> 31 + #include <linux/slab.h> 31 32 #include <asm/io.h> 32 33 #include <linux/atomic.h> 33 34 #include <linux/videodev2.h>
+3 -2
drivers/staging/speakup/devsynth.c
··· 18 18 { 19 19 size_t count = nbytes; 20 20 const char *ptr = buffer; 21 - int bytes; 21 + size_t bytes; 22 22 unsigned long flags; 23 23 u_char buf[256]; 24 + 24 25 if (synth == NULL) 25 26 return -ENODEV; 26 27 while (count > 0) { 27 - bytes = min_t(size_t, count, sizeof(buf)); 28 + bytes = min(count, sizeof(buf)); 28 29 if (copy_from_user(buf, ptr, bytes)) 29 30 return -EFAULT; 30 31 count -= bytes;
+1 -1
drivers/staging/zcache/Makefile
··· 1 - zcache-y := tmem.o 1 + zcache-y := zcache-main.o tmem.o 2 2 3 3 obj-$(CONFIG_ZCACHE) += zcache.o
+10 -3
drivers/staging/zcache/zcache.c drivers/staging/zcache/zcache-main.c
··· 19 19 * http://marc.info/?l=linux-mm&m=127811271605009 20 20 */ 21 21 22 + #include <linux/module.h> 22 23 #include <linux/cpu.h> 23 24 #include <linux/highmem.h> 24 25 #include <linux/list.h> ··· 28 27 #include <linux/spinlock.h> 29 28 #include <linux/types.h> 30 29 #include <linux/atomic.h> 30 + #include <linux/math64.h> 31 31 #include "tmem.h" 32 32 33 33 #include "../zram/xvmalloc.h" /* if built in drivers/staging */ ··· 55 53 56 54 #define MAX_CLIENTS 16 57 55 #define LOCAL_CLIENT ((uint16_t)-1) 56 + 57 + MODULE_LICENSE("GPL"); 58 + 58 59 struct zcache_client { 59 60 struct tmem_pool *tmem_pools[MAX_POOLS_PER_CLIENT]; 60 61 struct xv_pool *xvpool; ··· 1163 1158 uint16_t client_id = get_client_id_from_client(cli); 1164 1159 unsigned long zv_mean_zsize; 1165 1160 unsigned long curr_pers_pampd_count; 1161 + u64 total_zsize; 1166 1162 1167 1163 if (eph) { 1168 1164 ret = zcache_compress(page, &cdata, &clen); ··· 1196 1190 } 1197 1191 /* reject if mean compression is too poor */ 1198 1192 if ((clen > zv_max_mean_zsize) && (curr_pers_pampd_count > 0)) { 1199 - zv_mean_zsize = xv_get_total_size_bytes(cli->xvpool) / 1200 - curr_pers_pampd_count; 1193 + total_zsize = xv_get_total_size_bytes(cli->xvpool); 1194 + zv_mean_zsize = div_u64(total_zsize, 1195 + curr_pers_pampd_count); 1201 1196 if (zv_mean_zsize > zv_max_mean_zsize) { 1202 1197 zcache_mean_compress_poor++; 1203 1198 goto out; ··· 1936 1929 1937 1930 static int __init zcache_init(void) 1938 1931 { 1939 - #ifdef CONFIG_SYSFS 1940 1932 int ret = 0; 1941 1933 1934 + #ifdef CONFIG_SYSFS 1942 1935 ret = sysfs_create_group(mm_kobj, &zcache_attr_group); 1943 1936 if (ret) { 1944 1937 pr_err("zcache: can't create sysfs\n");