1
0
Fork 0
alistair23-linux/sound
Arnd Bergmann 645ef9ef1f sound: autoconvert trivial BKL users to private mutex
The usage of the BKL in the OSS sound drivers is
trivial, and each of them only locks against itself,
so it can be turned into per-driver mutexes.

This is the script that was used for the conversion:

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-14 23:14:50 +02:00
..
aoa of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
arm Merge remote branch 'alsa/devel' into topic/misc 2010-04-16 15:20:06 +02:00
atmel ALSA: atmel: set "channel A event" output to debug 2010-06-08 16:42:02 +02:00
core sound: Use static const char * const where possible 2010-09-14 16:15:37 +02:00
drivers sound: Remove unnecessary casts of private_data 2010-09-07 08:05:59 +02:00
i2c sound: Remove unnecessary casts of private_data 2010-09-07 08:05:59 +02:00
isa Merge branch 'fix/misc' into topic/misc 2010-09-09 10:51:45 +02:00
mips sound: Add missing spin_unlock 2010-05-27 09:47:02 +02:00
oss sound: autoconvert trivial BKL users to private mutex 2010-09-14 23:14:50 +02:00
parisc ALSA: sound/parisc: Move dereference after NULL test 2009-10-30 12:01:38 +01:00
pci Merge branch 'fix/misc' into topic/misc 2010-09-14 16:15:29 +02:00
pcmcia pcmcia: do not use io_req_t when calling pcmcia_request_io() 2010-08-03 09:04:11 +02:00
ppc ALSA: sound/ppc/powermac: remove undefined operations 2010-09-14 16:19:34 +02:00
sh 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
soc sound: Remove pr_<level> uses of KERN_<level> 2010-09-13 23:40:29 +02:00
sparc of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
spi ALSA: sound/spi: patch for the unuseful variable removal 2010-06-08 16:51:27 +02:00
synth ALSA: emux: Add trivial compat ioctl handler 2010-09-14 16:18:11 +02:00
usb ALSA: snd-usb-caiaq: Add support for Traktor Kontrol S4 2010-09-10 11:08:39 +02:00
Kconfig tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
Makefile ALSA: Add Atmel ALSA drivers directory 2009-02-05 15:08:53 +01:00
ac97_bus.c ALSA: ac97 - Include ac97_codec.h for ac97_bus_type declaration 2008-12-02 16:25:37 +01:00
last.c [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
sound_core.c sound: push BKL into open functions 2010-07-12 17:41:05 +02:00
sound_firmware.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