1. 16 9月, 2010 1 次提交
  2. 15 9月, 2010 1 次提交
    • A
      sound: autoconvert trivial BKL users to private mutex · 645ef9ef
      Arnd Bergmann 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      645ef9ef
  3. 14 9月, 2010 5 次提交
  4. 13 9月, 2010 1 次提交
  5. 12 9月, 2010 6 次提交
  6. 11 9月, 2010 8 次提交
  7. 10 9月, 2010 18 次提交