dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

8 Commits

Author SHA1 Message Date
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
Geert Uytterhoeven f8d261d39a staging: spectra needs <linux/slab.h>
On one of my m68k test builds I get:

drivers/staging/spectra/ffsport.c: In function ‘ioctl_read_page_data’:
drivers/staging/spectra/ffsport.c:196: error: implicit declaration of function ‘kmalloc’
drivers/staging/spectra/ffsport.c:196: warning: assignment makes pointer from integer without a cast
drivers/staging/spectra/ffsport.c:212: error: implicit declaration of function ‘kfree’
drivers/staging/spectra/ffsport.c: In function ‘ioctl_write_page_data’:
drivers/staging/spectra/ffsport.c:229: warning: assignment makes pointer from integer without a cast
drivers/staging/spectra/ffsport.c: In function ‘SBD_setup_device’:
drivers/staging/spectra/ffsport.c:637: warning: assignment makes pointer from integer without a cast

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-03 17:37:15 -07:00
Javier Martinez Canillas c321da6dc5 Staging: spectra: remove duplicate GLOB_VERSION definition
This is the first patch of a patchset that removes all compilations
warnings in staging/spectra.

These patches are a delta from a previous patchset and it assumes that
these three patches all already applied:

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-23 18:15:34 -07:00
Javier Martinez Canillas 6e19d2db49 Staging: spectra: don't use locked_ioctl, fix build
Last patch has a style problem. Sending the correct one. Sorry for the noise

Since BKL was removed from block ioctl handling code, locked_ioctl doesn't
exist anymore.

Using ioctl instead and doing the locking manually.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-23 18:15:34 -07:00
Javier Martinez Canillas 7b633f6624 Staging: use new REQ_FLUSH flag, fix build breakage
REQ_TYPE_LINUX_BLOCK and REQ_LB_OP_FLUSH doesn't exist anymore. Using
the new REQ_FLUSH flag instead

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-23 18:15:33 -07:00
Javier Martinez Canillas 09e74c794f Staging: spectra: removes q->prepare_flush_fn, fix build breakage
This patch is the first one of a patchset that allows 
stagin/spectra driver to compile in linux-next. 

blk_queue_ordered doesn't receive a prepare flush function anymore

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-23 18:15:33 -07:00
Javier Martinez Canillas eeba34d97a Staging: spectra: remove non existing blk_fs_request wrapper
The spectra driver doesn't compile with today linux-next

The problem is that it tries to use a blk_fs_request macro. Searching
for this macro I saw that it used to exist in linux/blkdev.h as

#define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS)

This patch solves the issue eliminating the unnecessary (and now inexistent) wrapper

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-25 11:11:22 -07:00
David Woodhouse 8ae4f63623 spectra: Move to drivers/staging
It'll take some work before this is really shippable.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-06-08 18:08:32 +01:00