android_kernel_xiaomi_sm8350/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
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
oss sound: autoconvert trivial BKL users to private mutex 2010-09-14 23:14:50 +02:00
parisc
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
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
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c sound: push BKL into open functions 2010-07-12 17:41:05 +02:00
sound_firmware.c