remarkable-linux/drivers/ide
Arnd Bergmann 2a48fc0ab2 block: autoconvert trivial BKL users to private mutex
The block device drivers have all gained new lock_kernel
calls from a recent pushdown, and some of the drivers
were already using the BKL before.

This turns the BKL into a set of per-driver mutexes.
Still need to check whether this is safe to do.

file=$1
name=$2
if grep -q lock_kernel ${file} ; then
    if grep -q 'include.*linux.mutex.h' ${file} ; then
            sed -i '/include.*<linux\/smp_lock.h>/d' ${file}
    else
            sed -i 's/include.*<linux\/smp_lock.h>.*$/include <linux\/mutex.h>/g' ${file}
    fi
    sed -i ${file} \
        -e "/^#include.*linux.mutex.h/,$ {
                1,/^\(static\|int\|long\)/ {
                     /^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);

} }"  \
    -e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
    -e '/[      ]*cycle_kernel_lock();/d'
else
    sed -i -e '/include.*\<smp_lock.h\>/d' ${file}  \
                -e '/cycle_kernel_lock()/d'
fi

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2010-10-05 15:01:10 +02:00
..
aec62xx.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
ali14xx.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
alim15x3.c alim15x3: fix handling of UDMA enable bit 2010-01-19 01:52:31 -08:00
amd74xx.c amd74xx: use ->pio_mode value to determine pair device speed 2010-01-19 01:52:32 -08:00
at91_ide.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
atiixp.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
au1xxx-ide.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-next-2.6 2010-03-04 08:24:06 -08:00
buddha.c
cmd64x.c cmd64x: fix handling of address setup timings 2010-01-19 01:52:32 -08:00
cmd640.c cmd640: fix kernel oops in test_irq() method 2010-05-11 00:08:03 -07:00
cs5520.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
cs5530.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
cs5535.c cs5535: use ->pio_mode value to determine pair device speed 2010-01-19 01:52:33 -08:00
cs5536.c cs5536: use ->pio_mode value to determine pair device speed 2010-01-19 01:52:33 -08:00
cy82c693.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
delkin_cb.c
dtc2278.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
falconide.c
gayle.c m68k: amiga - Amiga Gayle IDE platform device conversion 2010-05-26 19:51:09 +02:00
hpt366.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ht6560b.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
icside.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ide-2.6 2010-03-02 23:57:59 -08:00
ide-4drives.c
ide-acpi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ide-atapi.c block: fix some more cmd_type cleanup fallout 2010-08-07 18:22:29 +02:00
ide-cd.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
ide-cd.h
ide-cd_ioctl.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
ide-cd_verbose.c
ide-cs.c pcmcia: do not use io_req_t when calling pcmcia_request_io() 2010-08-03 09:04:11 +02:00
ide-devsets.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ide-disk.c block: remove q->prepare_flush_fn completely 2010-08-07 18:24:15 +02:00
ide-disk.h
ide-disk_ioctl.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
ide-disk_proc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ide-dma-sff.c
ide-dma.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6 2010-04-08 07:45:36 -07:00
ide-eh.c block: remove wrappers for request type/flags 2010-08-07 18:17:56 +02:00
ide-floppy.c block: unify flags for struct bio and struct request 2010-08-07 18:20:39 +02:00
ide-floppy.h
ide-floppy_ioctl.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
ide-floppy_proc.c
ide-gd.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
ide-gd.h
ide-generic.c
ide-h8300.c
ide-io-std.c
ide-io.c block: fix some more cmd_type cleanup fallout 2010-08-07 18:22:29 +02:00
ide-ioctls.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ide-iops.c ide: add SATA cable detection support 2010-01-19 01:41:57 -08:00
ide-legacy.c
ide-lib.c
ide-park.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ide-pci-generic.c pata_piccolo: Driver for old Toshiba chipsets 2009-12-03 14:35:31 -05:00
ide-pio-blacklist.c
ide-pm.c block: remove wrappers for request type/flags 2010-08-07 18:17:56 +02:00
ide-pnp.c
ide-probe.c Revert "ide: skip probe if there are no devices on the port (v2)" 2010-03-28 18:58:28 -07:00
ide-proc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ide-scan-pci.c
ide-sysfs.c
ide-tape.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
ide-taskfile.c drivers/ide: Use memdup_user 2010-08-09 03:17:53 -07:00
ide-timings.c ide: ide_timing_compute() fixup 2010-01-19 11:30:09 -08:00
ide-xfer-mode.c ide: make ide_get_best_pio_mode() static 2010-01-19 01:52:36 -08:00
ide.c ide: use module_param_named rather than module_param_call 2010-08-11 23:04:39 +09:30
ide_platform.c IDE: pass IRQ flags to the IDE core 2010-04-15 14:20:53 -07:00
it821x.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
it8172.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
it8213.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
jmicron.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
Kconfig
macide.c
Makefile
ns87415.c
opti621.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
palm_bk3710.c palm_bk3710: use ->pio_mode value to determine pair device speed 2010-01-19 01:52:34 -08:00
pdc202xx_new.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
pdc202xx_old.c pdc202xx_old: ignore "FIFO empty" bit in test_irq() method 2010-04-22 19:11:24 -07:00
piix.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
pmac.c powerpc/macio: Fix probing of macio devices by using the right of match table 2010-06-02 17:50:38 +10:00
q40ide.c
qd65xx.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
qd65xx.h
rapide.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
rz1000.c
sc1200.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
scc_pata.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ide-2.6 2010-03-02 23:57:59 -08:00
serverworks.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
setup-pci.c
sgiioc4.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
siimage.c siimage: use ->pio_mode value to determine pair device speed 2010-01-19 01:52:35 -08:00
sis5513.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
sl82c105.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
slc90e66.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
tc86c001.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
triflex.c ide: change ->set_dma_mode method parameters 2010-01-19 01:45:29 -08:00
trm290.c
tx4938ide.c tx493xide: use min_t() macro instead of min() 2010-08-09 03:17:55 -07:00
tx4939ide.c tx493xide: use min_t() macro instead of min() 2010-08-09 03:17:55 -07:00
umc8672.c ide: change ->set_pio_mode method parameters 2010-01-19 01:44:41 -08:00
via82cxxx.c via82cxxx: fix typo for VT6415 PCIE PATA IDE Host Controller support. 2010-08-09 03:17:51 -07:00