Skip to content

Commit

Permalink
Staging: spectra: don't use locked_ioctl, fix build
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Javier Martinez Canillas authored and Greg Kroah-Hartman committed Aug 24, 2010
1 parent 7b633f6 commit 6e19d2d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion drivers/staging/spectra/ffsport.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/kthread.h>
#include <linux/log2.h>
#include <linux/init.h>
#include <linux/smp_lock.h>

/**** Helper functions used for Div, Remainder operation on u64 ****/

Expand Down Expand Up @@ -589,11 +590,23 @@ int GLOB_SBD_ioctl(struct block_device *bdev, fmode_t mode,
return -ENOTTY;
}

int GLOB_SBD_unlocked_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
int ret;

lock_kernel();
ret = GLOB_SBD_ioctl(bdev, mode, cmd, arg);
unlock_kernel();

return ret;
}

static struct block_device_operations GLOB_SBD_ops = {
.owner = THIS_MODULE,
.open = GLOB_SBD_open,
.release = GLOB_SBD_release,
.locked_ioctl = GLOB_SBD_ioctl,
.ioctl = GLOB_SBD_unlocked_ioctl,
.getgeo = GLOB_SBD_getgeo,
};

Expand Down

0 comments on commit 6e19d2d

Please sign in to comment.