Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141498
b: refs/heads/master
c: 0b3fb27
h: refs/heads/master
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 3434f49 commit 8369683
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 93 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2e561b12e84a5363846669c5e0c070baf4d06a1a
refs/heads/master: 0b3fb27fa7b4bf811c31ee66453cda0a6d94aa6c
88 changes: 43 additions & 45 deletions trunk/drivers/staging/comedi/comedilib.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,16 @@

#ifndef KCOMEDILIB_DEPRECATED

typedef void comedi_t;

/* 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
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
the lock for the subdevice */
Expand All @@ -56,68 +54,68 @@ int comedi_loglevel(int loglevel);
void comedi_perror(const char *s);
char *comedi_strerror(int errnum);
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);

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);
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);
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);
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,
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);
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);
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);
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);
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 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);
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 */
int comedi_get_rangetype(comedi_t *dev, unsigned int subdevice,
int comedi_get_rangetype(void *dev, unsigned int subdevice,
unsigned int chan);

/* 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);
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);
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);
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);
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

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/comedi/drivers/comedi_bond.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static const struct BondingBoard bondingBoards[] = {
#define thisboard ((const struct BondingBoard *)dev->board_ptr)

struct BondedDevice {
comedi_t *dev;
void *dev;
unsigned minor;
unsigned subdev;
unsigned subdev_type;
Expand Down Expand Up @@ -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)
{
int i;
comedi_t *devs_opened[COMEDI_NUM_BOARD_MINORS];
void *devs_opened[COMEDI_NUM_BOARD_MINORS];

memset(devs_opened, 0, sizeof(devs_opened));
devpriv->name[0] = 0;;
Expand All @@ -406,7 +406,7 @@ static int doDevConfig(comedi_device *dev, comedi_devconfig *it)
for (i = 0; i < COMEDI_NDEVCONFOPTS && (!i || it->options[i]); ++i) {
char file[] = "/dev/comediXXXXXX";
int minor = it->options[i];
comedi_t *d;
void *d;
int sdev = -1, nchans, tmp;
struct BondedDevice *bdev = NULL;

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/comedi/kcomedilib/data.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#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)
{
comedi_insn insn;
Expand All @@ -42,7 +42,7 @@ int comedi_data_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
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)
{
comedi_insn insn;
Expand All @@ -57,7 +57,7 @@ int comedi_data_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
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)
{
comedi_insn insn;
Expand All @@ -73,7 +73,7 @@ int comedi_data_read_hint(comedi_t *dev, unsigned int subdev,
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,
lsampl_t *data, unsigned int nano_sec)
{
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/comedi/kcomedilib/dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#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)
{
comedi_insn insn;
Expand All @@ -41,7 +41,7 @@ int comedi_dio_config(comedi_t *dev, unsigned int subdev, unsigned int chan,
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)
{
comedi_insn insn;
Expand All @@ -56,7 +56,7 @@ int comedi_dio_read(comedi_t *dev, unsigned int subdev, unsigned int chan,
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)
{
comedi_insn insn;
Expand All @@ -71,7 +71,7 @@ int comedi_dio_write(comedi_t *dev, unsigned int subdev, unsigned int chan,
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)
{
comedi_insn insn;
Expand Down
Loading

0 comments on commit 8369683

Please sign in to comment.