Commit b153d83e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: vmk80xx.c: get the driver to build properly

There have been changes in the comedi core, this fixes the vmk80xx.c
driver to work properly with them, so it now will build properly.

Cc: Manuel Gebele <forensixs@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3faad673
...@@ -32,7 +32,6 @@ Status: works ...@@ -32,7 +32,6 @@ Status: works
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/comedidev.h> /* comedi definitions */
#include <linux/module.h> #include <linux/module.h>
#include <linux/mutex.h> #include <linux/mutex.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -42,6 +41,8 @@ Status: works ...@@ -42,6 +41,8 @@ Status: works
#include <linux/usb.h> #include <linux/usb.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include "../comedidev.h" /* comedi definitions */
/* ------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------ */
#define VMK80XX_MODULE_DESC "Velleman USB Interface Board Kernel-Space Driver" #define VMK80XX_MODULE_DESC "Velleman USB Interface Board Kernel-Space Driver"
#define VMK80XX_MODULE_DEVICE "Velleman K8055/K8061 USB Interface Board" #define VMK80XX_MODULE_DEVICE "Velleman K8055/K8061 USB Interface Board"
...@@ -346,8 +347,8 @@ static int vm_write(struct vmk80xx_usb *vm, unsigned char cmd) ...@@ -346,8 +347,8 @@ static int vm_write(struct vmk80xx_usb *vm, unsigned char cmd)
/* --------------------------------------------------------------------------- /* ---------------------------------------------------------------------------
* COMEDI-Interface (callback functions for the userspacs apps). * COMEDI-Interface (callback functions for the userspacs apps).
--------------------------------------------------------------------------- */ --------------------------------------------------------------------------- */
static int vm_ai_rinsn(comedi_device *dev, comedi_subdevice *s, static int vm_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -399,8 +400,8 @@ static int vm_ai_rinsn(comedi_device *dev, comedi_subdevice *s, ...@@ -399,8 +400,8 @@ static int vm_ai_rinsn(comedi_device *dev, comedi_subdevice *s,
return retval; return retval;
} }
static int vm_ao_winsn(comedi_device *dev, comedi_subdevice *s, static int vm_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -454,8 +455,8 @@ static int vm_ao_winsn(comedi_device *dev, comedi_subdevice *s, ...@@ -454,8 +455,8 @@ static int vm_ao_winsn(comedi_device *dev, comedi_subdevice *s,
return retval; return retval;
} }
static int vm_di_rinsn(comedi_device *dev, comedi_subdevice *s, static int vm_di_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -504,8 +505,8 @@ static int vm_di_rinsn(comedi_device *dev, comedi_subdevice *s, ...@@ -504,8 +505,8 @@ static int vm_di_rinsn(comedi_device *dev, comedi_subdevice *s,
return retval; return retval;
} }
static int vm_do_winsn(comedi_device *dev, comedi_subdevice *s, static int vm_do_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -555,8 +556,8 @@ static int vm_do_winsn(comedi_device *dev, comedi_subdevice *s, ...@@ -555,8 +556,8 @@ static int vm_do_winsn(comedi_device *dev, comedi_subdevice *s,
return retval; return retval;
} }
static int vm_cnt_rinsn(comedi_device *dev, comedi_subdevice *s, static int vm_cnt_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -608,8 +609,8 @@ static int vm_cnt_rinsn(comedi_device *dev, comedi_subdevice *s, ...@@ -608,8 +609,8 @@ static int vm_cnt_rinsn(comedi_device *dev, comedi_subdevice *s,
return retval; return retval;
} }
static int vm_cnt_winsn(comedi_device *dev, comedi_subdevice *s, static int vm_cnt_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -659,8 +660,8 @@ static int vm_cnt_winsn(comedi_device *dev, comedi_subdevice *s, ...@@ -659,8 +660,8 @@ static int vm_cnt_winsn(comedi_device *dev, comedi_subdevice *s,
return retval; return retval;
} }
static int vm_cnt_cinsn(comedi_device *dev, comedi_subdevice *s, static int vm_cnt_cinsn(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -749,9 +750,9 @@ static DEFINE_MUTEX(glb_mutex); ...@@ -749,9 +750,9 @@ static DEFINE_MUTEX(glb_mutex);
* Hook-up (or deallocate) the virtual device file '/dev/comedi[minor]' with * Hook-up (or deallocate) the virtual device file '/dev/comedi[minor]' with
* the vmk80xx driver (comedi_config/rmmod). * the vmk80xx driver (comedi_config/rmmod).
--------------------------------------------------------------------------- */ --------------------------------------------------------------------------- */
static int vm_attach(comedi_device *dev, comedi_devconfig *it) static int vm_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ {
comedi_subdevice *s; struct comedi_subdevice *s;
int minor = dev->minor; int minor = dev->minor;
int idx, i; int idx, i;
...@@ -844,7 +845,7 @@ static int vm_attach(comedi_device *dev, comedi_devconfig *it) ...@@ -844,7 +845,7 @@ static int vm_attach(comedi_device *dev, comedi_devconfig *it)
return 0; return 0;
} }
static int vm_detach(comedi_device *dev) static int vm_detach(struct comedi_device *dev)
{ {
struct vmk80xx_usb *vm; struct vmk80xx_usb *vm;
int minor = dev->minor; int minor = dev->minor;
...@@ -1060,16 +1061,13 @@ static void vm_disconnect(struct usb_interface *intf) ...@@ -1060,16 +1061,13 @@ static void vm_disconnect(struct usb_interface *intf)
* Register/Deregister this driver with/from the usb subsystem and the comedi. * Register/Deregister this driver with/from the usb subsystem and the comedi.
--------------------------------------------------------------------------- */ --------------------------------------------------------------------------- */
static struct usb_driver vm_driver = { static struct usb_driver vm_driver = {
#ifdef COMEDI_HAVE_USB_DRIVER_OWNER
.owner = THIS_MODULE,
#endif
.name = "vmk80xx", .name = "vmk80xx",
.probe = vm_probe, .probe = vm_probe,
.disconnect = vm_disconnect, .disconnect = vm_disconnect,
.id_table = vm_id_table, .id_table = vm_id_table,
}; };
static comedi_driver driver_vm = { static struct comedi_driver driver_vm = {
.module = THIS_MODULE, .module = THIS_MODULE,
.driver_name = "vmk80xx", .driver_name = "vmk80xx",
.attach = vm_attach, .attach = vm_attach,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment