diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-11-19 18:29:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 16:52:27 -0500 |
commit | 5e08c19867cefd9d1a1f07e309338b93439d147a (patch) | |
tree | d1b36e4777a6dcdf53950158225531fd9ba9f155 /drivers | |
parent | 2ce411b57ec45a97bf0a0af4afe65b9ed5ad5159 (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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/me_daq.c | 21 |
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) = { | |||
195 | MODULE_DEVICE_TABLE(pci, me_pci_table); | 195 | MODULE_DEVICE_TABLE(pci, me_pci_table); |
196 | 196 | ||
197 | /* Board specification structure */ | 197 | /* Board specification structure */ |
198 | typedef struct { | 198 | struct me_board { |
199 | const char *name; /* driver name */ | 199 | const char *name; /* driver name */ |
200 | int device_id; | 200 | int device_id; |
201 | int ao_channel_nbr; /* DA config */ | 201 | int ao_channel_nbr; /* DA config */ |
@@ -207,9 +207,9 @@ typedef struct { | |||
207 | int ai_resolution_mask; | 207 | int ai_resolution_mask; |
208 | const comedi_lrange *ai_range_list; | 208 | const comedi_lrange *ai_range_list; |
209 | int dio_channel_nbr; /* DIO config */ | 209 | int dio_channel_nbr; /* DIO config */ |
210 | } me_board_struct; | 210 | }; |
211 | 211 | ||
212 | static const me_board_struct me_boards[] = { | 212 | static const struct me_board me_boards[] = { |
213 | { | 213 | { |
214 | /* -- ME-2600i -- */ | 214 | /* -- ME-2600i -- */ |
215 | .name = ME_DRIVER_NAME, | 215 | .name = ME_DRIVER_NAME, |
@@ -244,7 +244,7 @@ static const me_board_struct me_boards[] = { | |||
244 | } | 244 | } |
245 | }; | 245 | }; |
246 | 246 | ||
247 | #define me_board_nbr (sizeof(me_boards)/sizeof(me_board_struct)) | 247 | #define me_board_nbr (sizeof(me_boards)/sizeof(struct me_board)) |
248 | 248 | ||
249 | static comedi_driver me_driver = { | 249 | static comedi_driver me_driver = { |
250 | .driver_name = ME_DRIVER_NAME, | 250 | .driver_name = ME_DRIVER_NAME, |
@@ -255,7 +255,7 @@ static comedi_driver me_driver = { | |||
255 | COMEDI_PCI_INITCLEANUP(me_driver, me_pci_table); | 255 | COMEDI_PCI_INITCLEANUP(me_driver, me_pci_table); |
256 | 256 | ||
257 | /* Private data structure */ | 257 | /* Private data structure */ |
258 | typedef struct { | 258 | struct me_private_data { |
259 | struct pci_dev *pci_device; | 259 | struct pci_dev *pci_device; |
260 | void *plx_regbase; /* PLX configuration base address */ | 260 | void *plx_regbase; /* PLX configuration base address */ |
261 | void *me_regbase; /* Base address of the Meilhaus card */ | 261 | void *me_regbase; /* Base address of the Meilhaus card */ |
@@ -266,10 +266,9 @@ typedef struct { | |||
266 | unsigned short control_2; /* Mirror of CONTROL_2 register */ | 266 | unsigned short control_2; /* Mirror of CONTROL_2 register */ |
267 | unsigned short dac_control; /* Mirror of the DAC_CONTROL register */ | 267 | unsigned short dac_control; /* Mirror of the DAC_CONTROL register */ |
268 | int ao_readback[4]; /* Mirror of analog output data */ | 268 | int ao_readback[4]; /* Mirror of analog output data */ |
269 | }; | ||
269 | 270 | ||
270 | } me_private_data_struct; | 271 | #define dev_private ((struct me_private_data *)dev->private) |
271 | |||
272 | #define dev_private ((me_private_data_struct *)dev->private) | ||
273 | 272 | ||
274 | /* | 273 | /* |
275 | * ------------------------------------------------------------------ | 274 | * ------------------------------------------------------------------ |
@@ -636,7 +635,7 @@ static int me_attach(comedi_device *dev, comedi_devconfig *it) | |||
636 | { | 635 | { |
637 | struct pci_dev *pci_device; | 636 | struct pci_dev *pci_device; |
638 | comedi_subdevice *subdevice; | 637 | comedi_subdevice *subdevice; |
639 | me_board_struct *board; | 638 | struct me_board *board; |
640 | resource_size_t plx_regbase_tmp; | 639 | resource_size_t plx_regbase_tmp; |
641 | unsigned long plx_regbase_size_tmp; | 640 | unsigned long plx_regbase_size_tmp; |
642 | resource_size_t me_regbase_tmp; | 641 | resource_size_t me_regbase_tmp; |
@@ -647,7 +646,7 @@ static int me_attach(comedi_device *dev, comedi_devconfig *it) | |||
647 | int result, error, i; | 646 | int result, error, i; |
648 | 647 | ||
649 | /* Allocate private memory */ | 648 | /* Allocate private memory */ |
650 | if (alloc_private(dev, sizeof(me_private_data_struct)) < 0) | 649 | if (alloc_private(dev, sizeof(struct me_private_data)) < 0) |
651 | return -ENOMEM; | 650 | return -ENOMEM; |
652 | 651 | ||
653 | /* Probe the device to determine what device in the series it is. */ | 652 | /* 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) | |||
677 | } | 676 | } |
678 | 677 | ||
679 | dev->board_ptr = me_boards + i; | 678 | dev->board_ptr = me_boards + i; |
680 | board = (me_board_struct *) dev-> | 679 | board = (struct me_board *) dev-> |
681 | board_ptr; | 680 | board_ptr; |
682 | dev_private->pci_device = pci_device; | 681 | dev_private->pci_device = pci_device; |
683 | goto found; | 682 | goto found; |