Commit 940579fb authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: Remove pci9111_board_struct typedef

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 07b666b7
...@@ -294,7 +294,7 @@ MODULE_DEVICE_TABLE(pci, pci9111_pci_table); ...@@ -294,7 +294,7 @@ MODULE_DEVICE_TABLE(pci, pci9111_pci_table);
// Board specification structure // Board specification structure
// //
typedef struct { struct pci9111_board {
const char *name; // driver name const char *name; // driver name
int device_id; int device_id;
int ai_channel_nbr; // num of A/D chans int ai_channel_nbr; // num of A/D chans
...@@ -306,9 +306,9 @@ typedef struct { ...@@ -306,9 +306,9 @@ typedef struct {
const struct comedi_lrange *ai_range_list; // rangelist for A/D const struct comedi_lrange *ai_range_list; // rangelist for A/D
const struct comedi_lrange *ao_range_list; // rangelist for D/A const struct comedi_lrange *ao_range_list; // rangelist for D/A
unsigned int ai_acquisition_period_min_ns; unsigned int ai_acquisition_period_min_ns;
} pci9111_board_struct; };
static const pci9111_board_struct pci9111_boards[] = { static const struct pci9111_board pci9111_boards[] = {
{ {
name: "pci9111_hr", name: "pci9111_hr",
device_id:PCI9111_HR_DEVICE_ID, device_id:PCI9111_HR_DEVICE_ID,
...@@ -324,7 +324,7 @@ static const pci9111_board_struct pci9111_boards[] = { ...@@ -324,7 +324,7 @@ static const pci9111_board_struct pci9111_boards[] = {
}; };
#define pci9111_board_nbr \ #define pci9111_board_nbr \
(sizeof(pci9111_boards)/sizeof(pci9111_board_struct)) (sizeof(pci9111_boards)/sizeof(struct pci9111_board))
static struct comedi_driver pci9111_driver = { static struct comedi_driver pci9111_driver = {
driver_name:PCI9111_DRIVER_NAME, driver_name:PCI9111_DRIVER_NAME,
...@@ -564,7 +564,7 @@ pci9111_ai_do_cmd_test(struct comedi_device * dev, ...@@ -564,7 +564,7 @@ pci9111_ai_do_cmd_test(struct comedi_device * dev,
int error = 0; int error = 0;
int range, reference; int range, reference;
int i; int i;
pci9111_board_struct *board = (pci9111_board_struct *) dev->board_ptr; struct pci9111_board *board = (struct pci9111_board *) dev->board_ptr;
// Step 1 : check if trigger are trivialy valid // Step 1 : check if trigger are trivialy valid
...@@ -887,7 +887,7 @@ static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice ...@@ -887,7 +887,7 @@ static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice
unsigned int i, num_samples = num_bytes / sizeof(short); unsigned int i, num_samples = num_bytes / sizeof(short);
short *array = data; short *array = data;
int resolution = int resolution =
((pci9111_board_struct *) dev->board_ptr)->ai_resolution; ((struct pci9111_board *) dev->board_ptr)->ai_resolution;
for (i = 0; i < num_samples; i++) { for (i = 0; i < num_samples; i++) {
if (resolution == PCI9111_HR_AI_RESOLUTION) if (resolution == PCI9111_HR_AI_RESOLUTION)
...@@ -1075,7 +1075,7 @@ static int pci9111_ai_insn_read(struct comedi_device * dev, ...@@ -1075,7 +1075,7 @@ static int pci9111_ai_insn_read(struct comedi_device * dev,
struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data) struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
{ {
int resolution = int resolution =
((pci9111_board_struct *) dev->board_ptr)->ai_resolution; ((struct pci9111_board *) dev->board_ptr)->ai_resolution;
int timeout, i; int timeout, i;
...@@ -1252,7 +1252,7 @@ static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig * ...@@ -1252,7 +1252,7 @@ static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig *
unsigned long io_base, io_range, lcr_io_base, lcr_io_range; unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
struct pci_dev *pci_device; struct pci_dev *pci_device;
int error, i; int error, i;
const pci9111_board_struct *board; const struct pci9111_board *board;
if (alloc_private(dev, sizeof(pci9111_private_data_struct)) < 0) { if (alloc_private(dev, sizeof(pci9111_private_data_struct)) < 0) {
return -ENOMEM; return -ENOMEM;
...@@ -1285,7 +1285,7 @@ static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig * ...@@ -1285,7 +1285,7 @@ static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig *
} }
dev->board_ptr = pci9111_boards + i; dev->board_ptr = pci9111_boards + i;
board = (pci9111_board_struct *) dev-> board = (struct pci9111_board *) dev->
board_ptr; board_ptr;
dev_private->pci_device = pci_device; dev_private->pci_device = pci_device;
goto found; goto found;
......
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