/*
* 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 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 struct comedi_driver structure tells the Comedi core module
* 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);
* 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,
* 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;
}