summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-11-19 15:29:17 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:52:27 -0800
commit5e08c19867cefd9d1a1f07e309338b93439d147a (patch)
treed1b36e4777a6dcdf53950158225531fd9ba9f155
parent2ce411b57ec45a97bf0a0af4afe65b9ed5ad5159 (diff)
Staging: comedi: me_daq: remove typedefs
This removes the typedefs from the me_daq driver. Cc: Michael Hillmann <hillmann@syscongroup.de> Cc: David Schleef <ds@schleef.org> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/comedi/drivers/me_daq.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c
index c784ea999506..8821d5286082 100644
--- a/drivers/staging/comedi/drivers/me_daq.c
+++ b/drivers/staging/comedi/drivers/me_daq.c
@@ -195,7 +195,7 @@ static DEFINE_PCI_DEVICE_TABLE(me_pci_table) = {
MODULE_DEVICE_TABLE(pci, me_pci_table);
/* Board specification structure */
-typedef struct {
+struct me_board {
const char *name; /* driver name */
int device_id;
int ao_channel_nbr; /* DA config */
@@ -207,9 +207,9 @@ typedef struct {
int ai_resolution_mask;
const comedi_lrange *ai_range_list;
int dio_channel_nbr; /* DIO config */
-} me_board_struct;
+};
-static const me_board_struct me_boards[] = {
+static const struct me_board me_boards[] = {
{
/* -- ME-2600i -- */
.name = ME_DRIVER_NAME,
@@ -244,7 +244,7 @@ static const me_board_struct me_boards[] = {
}
};
-#define me_board_nbr (sizeof(me_boards)/sizeof(me_board_struct))
+#define me_board_nbr (sizeof(me_boards)/sizeof(struct me_board))
static comedi_driver me_driver = {
.driver_name = ME_DRIVER_NAME,
@@ -255,7 +255,7 @@ static comedi_driver me_driver = {
COMEDI_PCI_INITCLEANUP(me_driver, me_pci_table);
/* Private data structure */
-typedef struct {
+struct me_private_data {
struct pci_dev *pci_device;
void *plx_regbase; /* PLX configuration base address */
void *me_regbase; /* Base address of the Meilhaus card */
@@ -266,10 +266,9 @@ typedef struct {
unsigned short control_2; /* Mirror of CONTROL_2 register */
unsigned short dac_control; /* Mirror of the DAC_CONTROL register */
int ao_readback[4]; /* Mirror of analog output data */
+};
-} me_private_data_struct;
-
-#define dev_private ((me_private_data_struct *)dev->private)
+#define dev_private ((struct me_private_data *)dev->private)
/*
* ------------------------------------------------------------------
@@ -636,7 +635,7 @@ static int me_attach(comedi_device *dev, comedi_devconfig *it)
{
struct pci_dev *pci_device;
comedi_subdevice *subdevice;
- me_board_struct *board;
+ struct me_board *board;
resource_size_t plx_regbase_tmp;
unsigned long plx_regbase_size_tmp;
resource_size_t me_regbase_tmp;
@@ -647,7 +646,7 @@ static int me_attach(comedi_device *dev, comedi_devconfig *it)
int result, error, i;
/* Allocate private memory */
- if (alloc_private(dev, sizeof(me_private_data_struct)) < 0)
+ if (alloc_private(dev, sizeof(struct me_private_data)) < 0)
return -ENOMEM;
/* Probe the device to determine what device in the series it is. */
@@ -677,7 +676,7 @@ static int me_attach(comedi_device *dev, comedi_devconfig *it)
}
dev->board_ptr = me_boards + i;
- board = (me_board_struct *) dev->
+ board = (struct me_board *) dev->
board_ptr;
dev_private->pci_device = pci_device;
goto found;