#include <linux/serio.h>
#include <linux/config.h>
#include <linux/circ_buf.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
/* This module provides arbitrary resource management routines.
* I use it to manage the device's memory.
*/
#include <linux/ioport.h>
+
#define IFORCE_MAX_LENGTH 16
/* iforce::bus */
};
struct iforce {
- struct input_dev dev; /* Input device interface */
+ struct input_dev *dev; /* Input device interface */
struct iforce_device *type;
int bus;
struct circ_buf xmit;
unsigned char xmit_data[XMIT_SIZE];
long xmit_flags[1];
-
+
/* Force Feedback */
wait_queue_head_t wait;
struct resource device_memory;
struct iforce_core_effect core_effects[FF_EFFECTS_MAX];
- struct semaphore mem_mutex;
+ struct mutex mem_mutex;
};
/* Get hi and low bytes of a 16-bits int */
int iforce_upload_condition(struct iforce*, struct ff_effect*, int is_update);
/* Public variables */
-extern struct serio_dev iforce_serio_dev;
+extern struct serio_driver iforce_serio_drv;
extern struct usb_driver iforce_usb_driver;