#include <linux/kthread.h>
#include <linux/log2.h>
#include <linux/init.h>
+#include <linux/slab.h>
/**** Helper functions used for Div, Remainder operation on u64 ****/
#define GLOB_SBD_NAME "nd"
#define GLOB_SBD_IRQ_NUM (29)
-#define GLOB_VERSION "driver version 20091110"
#define GLOB_SBD_IOCTL_GC (0x7701)
#define GLOB_SBD_IOCTL_WL (0x7702)
return -ENOTTY;
}
+static DEFINE_MUTEX(ffsport_mutex);
+
+int GLOB_SBD_unlocked_ioctl(struct block_device *bdev, fmode_t mode,
+ unsigned int cmd, unsigned long arg)
+{
+ int ret;
+
+ mutex_lock(&ffsport_mutex);
+ ret = GLOB_SBD_ioctl(bdev, mode, cmd, arg);
+ mutex_unlock(&ffsport_mutex);
+
+ 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,
};