Skip to content

Commit

Permalink
Staging: comedi: Remove boardtype typedef
Browse files Browse the repository at this point in the history
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent bf8db92 commit 52bfe6c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions drivers/staging/comedi/drivers/icp_multi.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static int icp_multi_detach(comedi_device *dev);
*/
static unsigned short pci_list_builded = 0; /*>0 list of card is known */

typedef struct {
struct boardtype {
const char *name; /* driver name */
int device_id;
int iorange; /* I/O range len */
Expand All @@ -150,9 +150,9 @@ typedef struct {
const comedi_lrange *rangelist_ai; /* rangelist for A/D */
const char *rangecode; /* range codes for programming */
const comedi_lrange *rangelist_ao; /* rangelist for D/A */
} boardtype;
};

static const boardtype boardtypes[] = {
static const struct boardtype boardtypes[] = {
{"icp_multi", /* Driver name */
DEVICE_ID, /* PCI device ID */
IORANGE_ICP_MULTI, /* I/O range length */
Expand All @@ -171,7 +171,7 @@ static const boardtype boardtypes[] = {
&range_analog}, /* Rangelist for D/A */
};

#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
#define n_boardtypes (sizeof(boardtypes)/sizeof(struct boardtype))

static comedi_driver driver_icp_multi = {
driver_name:"icp_multi",
Expand All @@ -180,12 +180,12 @@ static comedi_driver driver_icp_multi = {
detach : icp_multi_detach,
num_names : n_boardtypes,
board_name : &boardtypes[0].name,
offset : sizeof(boardtype),
offset : sizeof(struct boardtype),
};

COMEDI_INITCLEANUP(driver_icp_multi);

typedef struct {
struct icp_multi_private {
struct pcilst_struct *card; /* pointer to card */
char valid; /* card is usable */
void *io_addr; /* Pointer to mapped io address */
Expand All @@ -202,10 +202,10 @@ typedef struct {
sampl_t ao_data[4]; /* data output buffer */
sampl_t di_data; /* Digital input data */
unsigned int do_data; /* Remember digital output data */
} icp_multi_private;
};

#define devpriv ((icp_multi_private *)dev->private)
#define this_board ((const boardtype *)dev->board_ptr)
#define devpriv ((struct icp_multi_private *)dev->private)
#define this_board ((const struct boardtype *)dev->board_ptr)

/*
==============================================================================
Expand Down Expand Up @@ -882,7 +882,7 @@ static int icp_multi_attach(comedi_device *dev, comedi_devconfig *it)
printk("icp_multi EDBG: BGN: icp_multi_attach(...)\n");

/* Alocate private data storage space */
ret = alloc_private(dev, sizeof(icp_multi_private));
ret = alloc_private(dev, sizeof(struct icp_multi_private));
if (ret < 0)
return ret;

Expand Down

0 comments on commit 52bfe6c

Please sign in to comment.