Commit 8c49292f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: comedi: remove typedefs from comedi_test.c

no more checkpatch.pl issues found in the comedi_test.c file.

Cc: Joachim Wuttke <Joachim.Wuttke@icn.siemens.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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e0639d76
...@@ -57,16 +57,16 @@ zero volts). ...@@ -57,16 +57,16 @@ zero volts).
#include "comedi_fc.h" #include "comedi_fc.h"
/* Board descriptions */ /* Board descriptions */
typedef struct waveform_board_struct { struct waveform_board {
const char *name; const char *name;
int ai_chans; int ai_chans;
int ai_bits; int ai_bits;
int have_dio; int have_dio;
} waveform_board; };
#define N_CHANS 8 #define N_CHANS 8
static const waveform_board waveform_boards[] = { static const struct waveform_board waveform_boards[] = {
{ {
.name = "comedi_test", .name = "comedi_test",
.ai_chans = N_CHANS, .ai_chans = N_CHANS,
...@@ -75,10 +75,10 @@ static const waveform_board waveform_boards[] = { ...@@ -75,10 +75,10 @@ static const waveform_board waveform_boards[] = {
}, },
}; };
#define thisboard ((const waveform_board *)dev->board_ptr) #define thisboard ((const struct waveform_board *)dev->board_ptr)
/* Data unique to this driver */ /* Data unique to this driver */
typedef struct { struct waveform_private {
struct timer_list timer; struct timer_list timer;
struct timeval last; /* time at which last timer interrupt occured */ struct timeval last; /* time at which last timer interrupt occured */
unsigned int uvolt_amplitude; /* waveform amplitude in microvolts */ unsigned int uvolt_amplitude; /* waveform amplitude in microvolts */
...@@ -90,8 +90,8 @@ typedef struct { ...@@ -90,8 +90,8 @@ typedef struct {
unsigned int convert_period; /* conversion period in usec */ unsigned int convert_period; /* conversion period in usec */
unsigned timer_running:1; unsigned timer_running:1;
lsampl_t ao_loopbacks[N_CHANS]; lsampl_t ao_loopbacks[N_CHANS];
} waveform_private; };
#define devpriv ((waveform_private *)dev->private) #define devpriv ((struct waveform_private *)dev->private)
static int waveform_attach(comedi_device *dev, comedi_devconfig *it); static int waveform_attach(comedi_device *dev, comedi_devconfig *it);
static int waveform_detach(comedi_device *dev); static int waveform_detach(comedi_device *dev);
...@@ -101,8 +101,8 @@ static comedi_driver driver_waveform = { ...@@ -101,8 +101,8 @@ static comedi_driver driver_waveform = {
.attach = waveform_attach, .attach = waveform_attach,
.detach = waveform_detach, .detach = waveform_detach,
.board_name = &waveform_boards[0].name, .board_name = &waveform_boards[0].name,
.offset = sizeof(waveform_board), .offset = sizeof(struct waveform_board),
.num_names = sizeof(waveform_boards) / sizeof(waveform_board), .num_names = sizeof(waveform_boards) / sizeof(struct waveform_board),
}; };
COMEDI_INITCLEANUP(driver_waveform); COMEDI_INITCLEANUP(driver_waveform);
...@@ -201,7 +201,7 @@ static int waveform_attach(comedi_device *dev, comedi_devconfig *it) ...@@ -201,7 +201,7 @@ static int waveform_attach(comedi_device *dev, comedi_devconfig *it)
dev->board_name = thisboard->name; dev->board_name = thisboard->name;
if (alloc_private(dev, sizeof(waveform_private)) < 0) if (alloc_private(dev, sizeof(struct waveform_private)) < 0)
return -ENOMEM; return -ENOMEM;
/* set default amplitude and period */ /* set default amplitude and period */
......
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