/*
* Bords
*/
-typedef struct pcmda12_board_struct {
+struct pcmda12_board {
const char *name;
-} pcmda12_board;
+};
/* note these have no effect and are merely here for reference..
these are configured by jumpering the board! */
-static const comedi_lrange pcmda12_ranges = {
+static const struct comedi_lrange pcmda12_ranges = {
3,
{
UNI_RANGE(5), UNI_RANGE(10), BIP_RANGE(5)
}
};
-static const pcmda12_board pcmda12_boards[] = {
+static const struct pcmda12_board pcmda12_boards[] = {
{
name: "pcmda12",
},
/*
* Useful for shorthand access to the particular board structure
*/
-#define thisboard ((const pcmda12_board *)dev->board_ptr)
+#define thisboard ((const struct pcmda12_board *)dev->board_ptr)
+
+struct pcmda12_private {
-typedef struct {
unsigned int ao_readback[CHANS];
int simultaneous_xfer_mode;
-} pcmda12_private;
+};
+
-#define devpriv ((pcmda12_private *)(dev->private))
+#define devpriv ((struct pcmda12_private *)(dev->private))
/*
- * The comedi_driver structure tells the Comedi core module
+ * The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
-static int pcmda12_attach(struct comedi_device * dev, comedi_devconfig * it);
+static int pcmda12_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pcmda12_detach(struct comedi_device * dev);
static void zero_chans(struct comedi_device * dev);
-static comedi_driver driver = {
+static struct comedi_driver driver = {
driver_name:"pcmda12",
module:THIS_MODULE,
attach:pcmda12_attach,
* devices are such boards.
*/
board_name:&pcmda12_boards[0].name,
- offset:sizeof(pcmda12_board),
- num_names:sizeof(pcmda12_boards) / sizeof(pcmda12_board),
+ offset:sizeof(struct pcmda12_board),
+ num_names:sizeof(pcmda12_boards) / sizeof(struct pcmda12_board),
};
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data);
+ struct comedi_insn * insn, unsigned int * data);
/*
* Attach is called by the Comedi core to configure the driver
* in the driver structure, dev->board_ptr contains that
* address.
*/
-static int pcmda12_attach(struct comedi_device * dev, comedi_devconfig * it)
+static int pcmda12_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
unsigned long iobase;
* Allocate the private structure area. alloc_private() is a
* convenient macro defined in comedidev.h.
*/
- if (alloc_private(dev, sizeof(pcmda12_private)) < 0) {
+ if (alloc_private(dev, sizeof(struct pcmda12_private)) < 0) {
printk("cannot allocate private data structure\n");
return -ENOMEM;
}
}
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);
This is useful for some control applications, I would imagine.
*/
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
- comedi_insn * insn, unsigned int * data)
+ struct comedi_insn * insn, unsigned int * data)
{
int i;
int chan = CR_CHAN(insn->chanspec);