From 9ad007403fa4326586060e443ee344697daa60ec Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Wed, 25 Mar 2009 11:06:56 -0400 Subject: [PATCH] Staging: comedi: Remove labpc_board_struct typedef Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 8 ++++---- drivers/staging/comedi/drivers/ni_labpc.h | 4 ++-- drivers/staging/comedi/drivers/ni_labpc_cs.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 37898d8474cd..d7641cd920be 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -360,7 +360,7 @@ static inline void labpc_writeb(unsigned int byte, unsigned long address) writeb(byte, (void *)address); } -static const labpc_board labpc_boards[] = { +static const struct labpc_board_struct labpc_boards[] = { { name: "lab-pc-1200", ai_speed:10000, @@ -422,7 +422,7 @@ static const labpc_board labpc_boards[] = { /* * Useful for shorthand access to the particular board structure */ -#define thisboard ((labpc_board *)dev->board_ptr) +#define thisboard ((struct labpc_board_struct *)dev->board_ptr) static const int dma_buffer_size = 0xff00; // size in bytes of dma buffer static const int sample_size = 2; // 2 bytes per sample @@ -434,9 +434,9 @@ static struct comedi_driver driver_labpc = { .module = THIS_MODULE, .attach = labpc_attach, .detach = labpc_common_detach, - .num_names = sizeof(labpc_boards) / sizeof(labpc_board), + .num_names = sizeof(labpc_boards) / sizeof(struct labpc_board_struct), .board_name = &labpc_boards[0].name, - .offset = sizeof(labpc_board), + .offset = sizeof(struct labpc_board_struct), }; #ifdef CONFIG_COMEDI_PCI diff --git a/drivers/staging/comedi/drivers/ni_labpc.h b/drivers/staging/comedi/drivers/ni_labpc.h index b44b0d3d02f1..cf53a94a51a2 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.h +++ b/drivers/staging/comedi/drivers/ni_labpc.h @@ -32,7 +32,7 @@ enum labpc_register_layout { labpc_plus_layout, labpc_1200_layout }; enum transfer_type { fifo_not_empty_transfer, fifo_half_full_transfer, isa_dma_transfer }; -typedef struct labpc_board_struct { +struct labpc_board_struct { const char *name; int device_id; // device id for pci and pcmcia boards int ai_speed; // maximum input speed in nanoseconds @@ -44,7 +44,7 @@ typedef struct labpc_board_struct { const int *ai_range_is_unipolar; unsigned ai_scan_up:1; // board can auto scan up in ai channels, not just down unsigned memory_mapped_io:1; /* uses memory mapped io instead of ioports */ -} labpc_board; +}; typedef struct { struct mite_struct *mite; // for mite chip on pci-1200 diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c index 0c2a196adaff..1e58d2e40ab8 100644 --- a/drivers/staging/comedi/drivers/ni_labpc_cs.c +++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c @@ -81,7 +81,7 @@ static struct pcmcia_device *pcmcia_cur_dev = NULL; static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it); -static const labpc_board labpc_cs_boards[] = { +static const struct labpc_board_struct labpc_cs_boards[] = { { name: "daqcard-1200", device_id:0x103, // 0x10b is manufacturer id, 0x103 is device id @@ -114,16 +114,16 @@ static const labpc_board labpc_cs_boards[] = { /* * Useful for shorthand access to the particular board structure */ -#define thisboard ((const labpc_board *)dev->board_ptr) +#define thisboard ((const struct labpc_board_struct *)dev->board_ptr) static struct comedi_driver driver_labpc_cs = { .driver_name = "ni_labpc_cs", .module = THIS_MODULE, .attach = &labpc_attach, .detach = &labpc_common_detach, - .num_names = sizeof(labpc_cs_boards) / sizeof(labpc_board), + .num_names = sizeof(labpc_cs_boards) / sizeof(struct labpc_board_struct), .board_name = &labpc_cs_boards[0].name, - .offset = sizeof(labpc_board), + .offset = sizeof(struct labpc_board_struct), }; static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it) -- 2.39.5