浏览代码

Staging: comedi: Remove comedi_t typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bill Pemberton 16 年之前
父节点
当前提交
0b3fb27fa7

+ 43 - 45
drivers/staging/comedi/comedilib.h

@@ -36,18 +36,16 @@
 
 
 #ifndef KCOMEDILIB_DEPRECATED
 #ifndef KCOMEDILIB_DEPRECATED
 
 
-typedef void comedi_t;
-
 /* these functions may not be called at real-time priority */
 /* these functions may not be called at real-time priority */
 
 
-comedi_t *comedi_open(const char *path);
-int comedi_close(comedi_t *dev);
+void *comedi_open(const char *path);
+int comedi_close(void *dev);
 
 
 /* these functions may be called at any priority, but may fail at
 /* these functions may be called at any priority, but may fail at
    real-time priority */
    real-time priority */
 
 
-int comedi_lock(comedi_t *dev, unsigned int subdev);
-int comedi_unlock(comedi_t *dev, unsigned int subdev);
+int comedi_lock(void *dev, unsigned int subdev);
+int comedi_unlock(void *dev, unsigned int subdev);
 
 
 /* these functions may be called at any priority, but you must hold
 /* these functions may be called at any priority, but you must hold
    the lock for the subdevice */
    the lock for the subdevice */
@@ -56,68 +54,68 @@ int comedi_loglevel(int loglevel);
 void comedi_perror(const char *s);
 void comedi_perror(const char *s);
 char *comedi_strerror(int errnum);
 char *comedi_strerror(int errnum);
 int comedi_errno(void);
 int comedi_errno(void);
-int comedi_fileno(comedi_t *dev);
+int comedi_fileno(void *dev);
 
 
-int comedi_cancel(comedi_t *dev, unsigned int subdev);
-int comedi_register_callback(comedi_t *dev, unsigned int subdev,
+int comedi_cancel(void *dev, unsigned int subdev);
+int comedi_register_callback(void *dev, unsigned int subdev,
 	unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
 	unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
 
 
-int comedi_command(comedi_t *dev, comedi_cmd *cmd);
-int comedi_command_test(comedi_t *dev, comedi_cmd *cmd);
-int comedi_trigger(comedi_t *dev, unsigned int subdev, comedi_trig *it);
-int __comedi_trigger(comedi_t *dev, unsigned int subdev, comedi_trig *it);
-int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_command(void *dev, comedi_cmd *cmd);
+int comedi_command_test(void *dev, comedi_cmd *cmd);
+int comedi_trigger(void *dev, unsigned int subdev, comedi_trig *it);
+int __comedi_trigger(void *dev, unsigned int subdev, comedi_trig *it);
+int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int range, unsigned int aref, lsampl_t data);
 	unsigned int range, unsigned int aref, lsampl_t data);
-int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_data_read(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int range, unsigned int aref, lsampl_t *data);
 	unsigned int range, unsigned int aref, lsampl_t *data);
-int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
+int comedi_data_read_hint(void *dev, unsigned int subdev,
 	unsigned int chan, unsigned int range, unsigned int aref);
 	unsigned int chan, unsigned int range, unsigned int aref);
-int comedi_data_read_delayed(comedi_t *dev, unsigned int subdev,
+int comedi_data_read_delayed(void *dev, unsigned int subdev,
 	unsigned int chan, unsigned int range, unsigned int aref,
 	unsigned int chan, unsigned int range, unsigned int aref,
 	lsampl_t *data, unsigned int nano_sec);
 	lsampl_t *data, unsigned int nano_sec);
-int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int io);
 	unsigned int io);
-int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int *val);
 	unsigned int *val);
-int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_dio_write(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int val);
 	unsigned int val);
-int comedi_dio_bitfield(comedi_t *dev, unsigned int subdev, unsigned int mask,
+int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask,
 	unsigned int *bits);
 	unsigned int *bits);
-int comedi_get_n_subdevices(comedi_t *dev);
-int comedi_get_version_code(comedi_t *dev);
-const char *comedi_get_driver_name(comedi_t *dev);
-const char *comedi_get_board_name(comedi_t *dev);
-int comedi_get_subdevice_type(comedi_t *dev, unsigned int subdevice);
-int comedi_find_subdevice_by_type(comedi_t *dev, int type, unsigned int subd);
-int comedi_get_n_channels(comedi_t *dev, unsigned int subdevice);
-lsampl_t comedi_get_maxdata(comedi_t *dev, unsigned int subdevice, unsigned
+int comedi_get_n_subdevices(void *dev);
+int comedi_get_version_code(void *dev);
+const char *comedi_get_driver_name(void *dev);
+const char *comedi_get_board_name(void *dev);
+int comedi_get_subdevice_type(void *dev, unsigned int subdevice);
+int comedi_find_subdevice_by_type(void *dev, int type, unsigned int subd);
+int comedi_get_n_channels(void *dev, unsigned int subdevice);
+lsampl_t comedi_get_maxdata(void *dev, unsigned int subdevice, unsigned
 	int chan);
 	int chan);
-int comedi_get_n_ranges(comedi_t *dev, unsigned int subdevice, unsigned int
+int comedi_get_n_ranges(void *dev, unsigned int subdevice, unsigned int
 	chan);
 	chan);
-int comedi_do_insn(comedi_t *dev, comedi_insn *insn);
-int comedi_poll(comedi_t *dev, unsigned int subdev);
+int comedi_do_insn(void *dev, comedi_insn *insn);
+int comedi_poll(void *dev, unsigned int subdev);
 
 
 /* DEPRECATED functions */
 /* DEPRECATED functions */
-int comedi_get_rangetype(comedi_t *dev, unsigned int subdevice,
+int comedi_get_rangetype(void *dev, unsigned int subdevice,
 	unsigned int chan);
 	unsigned int chan);
 
 
 /* ALPHA functions */
 /* ALPHA functions */
-unsigned int comedi_get_subdevice_flags(comedi_t *dev, unsigned int subdevice);
-int comedi_get_len_chanlist(comedi_t *dev, unsigned int subdevice);
-int comedi_get_krange(comedi_t *dev, unsigned int subdevice, unsigned int
+unsigned int comedi_get_subdevice_flags(void *dev, unsigned int subdevice);
+int comedi_get_len_chanlist(void *dev, unsigned int subdevice);
+int comedi_get_krange(void *dev, unsigned int subdevice, unsigned int
 	chan, unsigned int range, comedi_krange *krange);
 	chan, unsigned int range, comedi_krange *krange);
-unsigned int comedi_get_buf_head_pos(comedi_t *dev, unsigned int subdevice);
-int comedi_set_user_int_count(comedi_t *dev, unsigned int subdevice,
+unsigned int comedi_get_buf_head_pos(void *dev, unsigned int subdevice);
+int comedi_set_user_int_count(void *dev, unsigned int subdevice,
 	unsigned int buf_user_count);
 	unsigned int buf_user_count);
-int comedi_map(comedi_t *dev, unsigned int subdev, void *ptr);
-int comedi_unmap(comedi_t *dev, unsigned int subdev);
-int comedi_get_buffer_size(comedi_t *dev, unsigned int subdev);
-int comedi_mark_buffer_read(comedi_t *dev, unsigned int subdevice,
+int comedi_map(void *dev, unsigned int subdev, void *ptr);
+int comedi_unmap(void *dev, unsigned int subdev);
+int comedi_get_buffer_size(void *dev, unsigned int subdev);
+int comedi_mark_buffer_read(void *dev, unsigned int subdevice,
 	unsigned int num_bytes);
 	unsigned int num_bytes);
-int comedi_mark_buffer_written(comedi_t *d, unsigned int subdevice,
+int comedi_mark_buffer_written(void *d, unsigned int subdevice,
 	unsigned int num_bytes);
 	unsigned int num_bytes);
-int comedi_get_buffer_contents(comedi_t *dev, unsigned int subdevice);
-int comedi_get_buffer_offset(comedi_t *dev, unsigned int subdevice);
+int comedi_get_buffer_contents(void *dev, unsigned int subdevice);
+int comedi_get_buffer_offset(void *dev, unsigned int subdevice);
 
 
 #else
 #else
 
 

+ 3 - 3
drivers/staging/comedi/drivers/comedi_bond.c

@@ -142,7 +142,7 @@ static const struct BondingBoard bondingBoards[] = {
 #define thisboard ((const struct BondingBoard *)dev->board_ptr)
 #define thisboard ((const struct BondingBoard *)dev->board_ptr)
 
 
 struct BondedDevice {
 struct BondedDevice {
-	comedi_t *dev;
+	void *dev;
 	unsigned minor;
 	unsigned minor;
 	unsigned subdev;
 	unsigned subdev;
 	unsigned subdev_type;
 	unsigned subdev_type;
@@ -397,7 +397,7 @@ static void *Realloc(const void *oldmem, size_t newlen, size_t oldlen)
 static int doDevConfig(comedi_device *dev, comedi_devconfig *it)
 static int doDevConfig(comedi_device *dev, comedi_devconfig *it)
 {
 {
 	int i;
 	int i;
-	comedi_t *devs_opened[COMEDI_NUM_BOARD_MINORS];
+	void *devs_opened[COMEDI_NUM_BOARD_MINORS];
 
 
 	memset(devs_opened, 0, sizeof(devs_opened));
 	memset(devs_opened, 0, sizeof(devs_opened));
 	devpriv->name[0] = 0;;
 	devpriv->name[0] = 0;;
@@ -406,7 +406,7 @@ static int doDevConfig(comedi_device *dev, comedi_devconfig *it)
 	for (i = 0; i < COMEDI_NDEVCONFOPTS && (!i || it->options[i]); ++i) {
 	for (i = 0; i < COMEDI_NDEVCONFOPTS && (!i || it->options[i]); ++i) {
 		char file[] = "/dev/comediXXXXXX";
 		char file[] = "/dev/comediXXXXXX";
 		int minor = it->options[i];
 		int minor = it->options[i];
-		comedi_t *d;
+		void *d;
 		int sdev = -1, nchans, tmp;
 		int sdev = -1, nchans, tmp;
 		struct BondedDevice *bdev = NULL;
 		struct BondedDevice *bdev = NULL;
 
 

+ 4 - 4
drivers/staging/comedi/kcomedilib/data.c

@@ -27,7 +27,7 @@
 
 
 #include <linux/string.h>
 #include <linux/string.h>
 
 
-int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int range, unsigned int aref, lsampl_t data)
 	unsigned int range, unsigned int aref, lsampl_t data)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;
@@ -42,7 +42,7 @@ int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
 	return comedi_do_insn(dev, &insn);
 	return comedi_do_insn(dev, &insn);
 }
 }
 
 
-int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_data_read(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int range, unsigned int aref, lsampl_t *data)
 	unsigned int range, unsigned int aref, lsampl_t *data)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;
@@ -57,7 +57,7 @@ int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
 	return comedi_do_insn(dev, &insn);
 	return comedi_do_insn(dev, &insn);
 }
 }
 
 
-int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
+int comedi_data_read_hint(void *dev, unsigned int subdev,
 	unsigned int chan, unsigned int range, unsigned int aref)
 	unsigned int chan, unsigned int range, unsigned int aref)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;
@@ -73,7 +73,7 @@ int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
 	return comedi_do_insn(dev, &insn);
 	return comedi_do_insn(dev, &insn);
 }
 }
 
 
-int comedi_data_read_delayed(comedi_t *dev, unsigned int subdev,
+int comedi_data_read_delayed(void *dev, unsigned int subdev,
 	unsigned int chan, unsigned int range, unsigned int aref,
 	unsigned int chan, unsigned int range, unsigned int aref,
 	lsampl_t *data, unsigned int nano_sec)
 	lsampl_t *data, unsigned int nano_sec)
 {
 {

+ 4 - 4
drivers/staging/comedi/kcomedilib/dio.c

@@ -26,7 +26,7 @@
 
 
 #include <linux/string.h>
 #include <linux/string.h>
 
 
-int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_dio_config(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int io)
 	unsigned int io)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;
@@ -41,7 +41,7 @@ int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
 	return comedi_do_insn(dev, &insn);
 	return comedi_do_insn(dev, &insn);
 }
 }
 
 
-int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_dio_read(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int *val)
 	unsigned int *val)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;
@@ -56,7 +56,7 @@ int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
 	return comedi_do_insn(dev, &insn);
 	return comedi_do_insn(dev, &insn);
 }
 }
 
 
-int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
+int comedi_dio_write(void *dev, unsigned int subdev, unsigned int chan,
 	unsigned int val)
 	unsigned int val)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;
@@ -71,7 +71,7 @@ int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
 	return comedi_do_insn(dev, &insn);
 	return comedi_do_insn(dev, &insn);
 }
 }
 
 
-int comedi_dio_bitfield(comedi_t *dev, unsigned int subdev, unsigned int mask,
+int comedi_dio_bitfield(void *dev, unsigned int subdev, unsigned int mask,
 	unsigned int *bits)
 	unsigned int *bits)
 {
 {
 	comedi_insn insn;
 	comedi_insn insn;

+ 20 - 20
drivers/staging/comedi/kcomedilib/get.c

@@ -26,33 +26,33 @@
 #include "../comedilib.h"
 #include "../comedilib.h"
 #include "../comedidev.h"
 #include "../comedidev.h"
 
 
-int comedi_get_n_subdevices(comedi_t *d)
+int comedi_get_n_subdevices(void *d)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 
 
 	return dev->n_subdevices;
 	return dev->n_subdevices;
 }
 }
 
 
-int comedi_get_version_code(comedi_t *d)
+int comedi_get_version_code(void *d)
 {
 {
 	return COMEDI_VERSION_CODE;
 	return COMEDI_VERSION_CODE;
 }
 }
 
 
-const char *comedi_get_driver_name(comedi_t * d)
+const char *comedi_get_driver_name(void * d)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 
 
 	return dev->driver->driver_name;
 	return dev->driver->driver_name;
 }
 }
 
 
-const char *comedi_get_board_name(comedi_t * d)
+const char *comedi_get_board_name(void * d)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 
 
 	return dev->board_name;
 	return dev->board_name;
 }
 }
 
 
-int comedi_get_subdevice_type(comedi_t *d, unsigned int subdevice)
+int comedi_get_subdevice_type(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -60,7 +60,7 @@ int comedi_get_subdevice_type(comedi_t *d, unsigned int subdevice)
 	return s->type;
 	return s->type;
 }
 }
 
 
-unsigned int comedi_get_subdevice_flags(comedi_t *d, unsigned int subdevice)
+unsigned int comedi_get_subdevice_flags(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -68,7 +68,7 @@ unsigned int comedi_get_subdevice_flags(comedi_t *d, unsigned int subdevice)
 	return s->subdev_flags;
 	return s->subdev_flags;
 }
 }
 
 
-int comedi_find_subdevice_by_type(comedi_t *d, int type, unsigned int subd)
+int comedi_find_subdevice_by_type(void *d, int type, unsigned int subd)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 
 
@@ -82,7 +82,7 @@ int comedi_find_subdevice_by_type(comedi_t *d, int type, unsigned int subd)
 	return -1;
 	return -1;
 }
 }
 
 
-int comedi_get_n_channels(comedi_t *d, unsigned int subdevice)
+int comedi_get_n_channels(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -90,7 +90,7 @@ int comedi_get_n_channels(comedi_t *d, unsigned int subdevice)
 	return s->n_chan;
 	return s->n_chan;
 }
 }
 
 
-int comedi_get_len_chanlist(comedi_t *d, unsigned int subdevice)
+int comedi_get_len_chanlist(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -98,7 +98,7 @@ int comedi_get_len_chanlist(comedi_t *d, unsigned int subdevice)
 	return s->len_chanlist;
 	return s->len_chanlist;
 }
 }
 
 
-lsampl_t comedi_get_maxdata(comedi_t *d, unsigned int subdevice,
+lsampl_t comedi_get_maxdata(void *d, unsigned int subdevice,
 	unsigned int chan)
 	unsigned int chan)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -111,7 +111,7 @@ lsampl_t comedi_get_maxdata(comedi_t *d, unsigned int subdevice,
 }
 }
 
 
 #ifdef KCOMEDILIB_DEPRECATED
 #ifdef KCOMEDILIB_DEPRECATED
-int comedi_get_rangetype(comedi_t *d, unsigned int subdevice,
+int comedi_get_rangetype(void *d, unsigned int subdevice,
 	unsigned int chan)
 	unsigned int chan)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -130,7 +130,7 @@ int comedi_get_rangetype(comedi_t *d, unsigned int subdevice,
 }
 }
 #endif
 #endif
 
 
-int comedi_get_n_ranges(comedi_t *d, unsigned int subdevice, unsigned int chan)
+int comedi_get_n_ranges(void *d, unsigned int subdevice, unsigned int chan)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -148,7 +148,7 @@ int comedi_get_n_ranges(comedi_t *d, unsigned int subdevice, unsigned int chan)
 /*
 /*
  * ALPHA (non-portable)
  * ALPHA (non-portable)
 */
 */
-int comedi_get_krange(comedi_t *d, unsigned int subdevice, unsigned int chan,
+int comedi_get_krange(void *d, unsigned int subdevice, unsigned int chan,
 	unsigned int range, comedi_krange *krange)
 	unsigned int range, comedi_krange *krange)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -171,7 +171,7 @@ int comedi_get_krange(comedi_t *d, unsigned int subdevice, unsigned int chan,
 /*
 /*
  * ALPHA (may be renamed)
  * ALPHA (may be renamed)
 */
 */
-unsigned int comedi_get_buf_head_pos(comedi_t *d, unsigned int subdevice)
+unsigned int comedi_get_buf_head_pos(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -184,7 +184,7 @@ unsigned int comedi_get_buf_head_pos(comedi_t *d, unsigned int subdevice)
 	return async->buf_write_count;
 	return async->buf_write_count;
 }
 }
 
 
-int comedi_get_buffer_contents(comedi_t *d, unsigned int subdevice)
+int comedi_get_buffer_contents(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;
@@ -203,7 +203,7 @@ int comedi_get_buffer_contents(comedi_t *d, unsigned int subdevice)
 /*
 /*
  * ALPHA
  * ALPHA
 */
 */
-int comedi_set_user_int_count(comedi_t *d, unsigned int subdevice,
+int comedi_set_user_int_count(void *d, unsigned int subdevice,
 	unsigned int buf_user_count)
 	unsigned int buf_user_count)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -224,7 +224,7 @@ int comedi_set_user_int_count(comedi_t *d, unsigned int subdevice,
 	return 0;
 	return 0;
 }
 }
 
 
-int comedi_mark_buffer_read(comedi_t *d, unsigned int subdevice,
+int comedi_mark_buffer_read(void *d, unsigned int subdevice,
 	unsigned int num_bytes)
 	unsigned int num_bytes)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -243,7 +243,7 @@ int comedi_mark_buffer_read(comedi_t *d, unsigned int subdevice,
 	return 0;
 	return 0;
 }
 }
 
 
-int comedi_mark_buffer_written(comedi_t *d, unsigned int subdevice,
+int comedi_mark_buffer_written(void *d, unsigned int subdevice,
 	unsigned int num_bytes)
 	unsigned int num_bytes)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -263,7 +263,7 @@ int comedi_mark_buffer_written(comedi_t *d, unsigned int subdevice,
 	return 0;
 	return 0;
 }
 }
 
 
-int comedi_get_buffer_size(comedi_t *d, unsigned int subdev)
+int comedi_get_buffer_size(void *d, unsigned int subdev)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdev;
 	comedi_subdevice *s = dev->subdevices + subdev;
@@ -278,7 +278,7 @@ int comedi_get_buffer_size(comedi_t *d, unsigned int subdev)
 	return async->prealloc_bufsz;
 	return async->prealloc_bufsz;
 }
 }
 
 
-int comedi_get_buffer_offset(comedi_t *d, unsigned int subdevice)
+int comedi_get_buffer_offset(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices + subdevice;
 	comedi_subdevice *s = dev->subdevices + subdevice;

+ 16 - 16
drivers/staging/comedi/kcomedilib/kcomedilib_main.c

@@ -42,7 +42,7 @@ MODULE_AUTHOR("David Schleef <ds@schleef.org>");
 MODULE_DESCRIPTION("Comedi kernel library");
 MODULE_DESCRIPTION("Comedi kernel library");
 MODULE_LICENSE("GPL");
 MODULE_LICENSE("GPL");
 
 
-comedi_t *comedi_open(const char *filename)
+void *comedi_open(const char *filename)
 {
 {
 	struct comedi_device_file_info *dev_file_info;
 	struct comedi_device_file_info *dev_file_info;
 	comedi_device *dev;
 	comedi_device *dev;
@@ -67,10 +67,10 @@ comedi_t *comedi_open(const char *filename)
 	if (!try_module_get(dev->driver->module))
 	if (!try_module_get(dev->driver->module))
 		return NULL;
 		return NULL;
 
 
-	return (comedi_t *) dev;
+	return (void *) dev;
 }
 }
 
 
-comedi_t *comedi_open_old(unsigned int minor)
+void *comedi_open_old(unsigned int minor)
 {
 {
 	struct comedi_device_file_info *dev_file_info;
 	struct comedi_device_file_info *dev_file_info;
 	comedi_device *dev;
 	comedi_device *dev;
@@ -86,10 +86,10 @@ comedi_t *comedi_open_old(unsigned int minor)
 	if (dev == NULL || !dev->attached)
 	if (dev == NULL || !dev->attached)
 		return NULL;
 		return NULL;
 
 
-	return (comedi_t *) dev;
+	return (void *) dev;
 }
 }
 
 
-int comedi_close(comedi_t *d)
+int comedi_close(void *d)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 
 
@@ -113,7 +113,7 @@ char *comedi_strerror(int err)
 	return "unknown error";
 	return "unknown error";
 }
 }
 
 
-int comedi_fileno(comedi_t *d)
+int comedi_fileno(void *d)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 
 
@@ -121,7 +121,7 @@ int comedi_fileno(comedi_t *d)
 	return dev->minor;
 	return dev->minor;
 }
 }
 
 
-int comedi_command(comedi_t *d, comedi_cmd *cmd)
+int comedi_command(void *d, comedi_cmd *cmd)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -161,7 +161,7 @@ int comedi_command(comedi_t *d, comedi_cmd *cmd)
 	return s->do_cmd(dev, s);
 	return s->do_cmd(dev, s);
 }
 }
 
 
-int comedi_command_test(comedi_t *d, comedi_cmd *cmd)
+int comedi_command_test(void *d, comedi_cmd *cmd)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -183,7 +183,7 @@ int comedi_command_test(comedi_t *d, comedi_cmd *cmd)
  *	COMEDI_INSN
  *	COMEDI_INSN
  *	perform an instruction
  *	perform an instruction
  */
  */
-int comedi_do_insn(comedi_t *d, comedi_insn *insn)
+int comedi_do_insn(void *d, comedi_insn *insn)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -324,7 +324,7 @@ int comedi_do_insn(comedi_t *d, comedi_insn *insn)
 	- lock while subdevice being programmed
 	- lock while subdevice being programmed
 
 
 */
 */
-int comedi_lock(comedi_t *d, unsigned int subdevice)
+int comedi_lock(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -367,7 +367,7 @@ int comedi_lock(comedi_t *d, unsigned int subdevice)
 		none
 		none
 
 
 */
 */
-int comedi_unlock(comedi_t *d, unsigned int subdevice)
+int comedi_unlock(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -419,7 +419,7 @@ int comedi_unlock(comedi_t *d, unsigned int subdevice)
 		nothing
 		nothing
 
 
 */
 */
-int comedi_cancel(comedi_t *d, unsigned int subdevice)
+int comedi_cancel(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -464,7 +464,7 @@ int comedi_cancel(comedi_t *d, unsigned int subdevice)
 /*
 /*
    registration of callback functions
    registration of callback functions
  */
  */
-int comedi_register_callback(comedi_t *d, unsigned int subdevice,
+int comedi_register_callback(void *d, unsigned int subdevice,
 	unsigned int mask, int (*cb) (unsigned int, void *), void *arg)
 	unsigned int mask, int (*cb) (unsigned int, void *), void *arg)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
@@ -501,7 +501,7 @@ int comedi_register_callback(comedi_t *d, unsigned int subdevice,
 	return 0;
 	return 0;
 }
 }
 
 
-int comedi_poll(comedi_t *d, unsigned int subdevice)
+int comedi_poll(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s = dev->subdevices;
 	comedi_subdevice *s = dev->subdevices;
@@ -528,7 +528,7 @@ int comedi_poll(comedi_t *d, unsigned int subdevice)
 }
 }
 
 
 /* WARNING: not portable */
 /* WARNING: not portable */
-int comedi_map(comedi_t *d, unsigned int subdevice, void *ptr)
+int comedi_map(void *d, unsigned int subdevice, void *ptr)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;
@@ -550,7 +550,7 @@ int comedi_map(comedi_t *d, unsigned int subdevice, void *ptr)
 }
 }
 
 
 /* WARNING: not portable */
 /* WARNING: not portable */
-int comedi_unmap(comedi_t *d, unsigned int subdevice)
+int comedi_unmap(void *d, unsigned int subdevice)
 {
 {
 	comedi_device *dev = (comedi_device *) d;
 	comedi_device *dev = (comedi_device *) d;
 	comedi_subdevice *s;
 	comedi_subdevice *s;