linux/drivers/s390/char
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
..
con3215.c [S390] con3215: remove empty ioctl function 2010-01-13 20:44:46 +01:00
con3270.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
ctrlchar.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
ctrlchar.h
defkeymap.c
defkeymap.map
fs3270.c [S390] avoid default_llseek in s390 drivers 2010-05-17 10:00:16 +02:00
Kconfig [S390] vmcp: disallow modular build 2010-05-17 10:00:15 +02:00
keyboard.c Input: sysrq - drop tty argument form handle_sysrq() 2010-08-21 00:34:45 -07:00
keyboard.h
Makefile [S390] add call home support 2009-09-11 10:29:49 +02:00
monreader.c s390: remove WARN_ON for misc_deregister() failures 2010-08-09 20:45:06 -07:00
monwriter.c s390: remove WARN_ON for misc_deregister() failures 2010-08-09 20:45:06 -07:00
raw3270.c tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
raw3270.h [S390] pm: con3270 power management callbacks. 2009-06-16 10:31:20 +02:00
sclp_async.c [S390] sclp_async: potential buffer overflow 2010-04-09 13:43:02 +02:00
sclp_cmd.c [S390] sclp: avoid 64 bit division 2010-03-24 11:49:53 +01:00
sclp_con.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
sclp_config.c [S390] convert sclp printks to pr_xxx macros. 2008-12-25 13:39:24 +01:00
sclp_cpi_sys.c Fix typos in comments 2010-03-16 11:47:56 +01:00
sclp_cpi_sys.h
sclp_cpi.c
sclp_quiesce.c [S390] sclp: undo quiesce handler override on resume 2009-11-13 15:45:03 +01:00
sclp_rw.c [S390] pm: power management support for SCLP drivers. 2009-06-16 10:31:16 +02:00
sclp_rw.h [S390] sclp: fix compile error for !SCLP_CONSOLE 2009-07-07 16:37:50 +02:00
sclp_sdias.c [S390] convert sclp printks to pr_xxx macros. 2008-12-25 13:39:24 +01:00
sclp_tty.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
sclp_tty.h
sclp_vt220.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
sclp.c tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
sclp.h [S390] add call home support 2009-09-11 10:29:49 +02:00
tape_34xx.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
tape_3590.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
tape_3590.h
tape_block.c block: autoconvert trivial BKL users to private mutex 2010-10-05 15:01:10 +02:00
tape_char.c [S390] tape_char: add missing compat_ptr conversion 2010-01-13 20:44:46 +01:00
tape_class.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
tape_class.h
tape_core.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
tape_proc.c [S390] tape: Add pr_fmt() macro to all tape source files 2009-12-18 17:43:32 +01:00
tape_std.c [S390] tape: Add pr_fmt() macro to all tape source files 2009-12-18 17:43:32 +01:00
tape_std.h
tape.h [S390] tape: remove BKL from tape driver 2009-12-07 12:51:36 +01:00
tty3270.c [S390] tty3270: move keyboard compat ioctls 2009-12-07 12:51:38 +01:00
tty3270.h
vmcp.c [S390] vmcp: disallow modular build 2010-05-17 10:00:15 +02:00
vmcp.h
vmlogrdr.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
vmur.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
vmur.h
vmwatchdog.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
zcore.c [S390] avoid default_llseek in s390 drivers 2010-05-17 10:00:16 +02:00