Skip to content

Commit

Permalink
Staging: comedi: Remove comedi_driver 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 d163679 commit 139dfbd
Show file tree
Hide file tree
Showing 106 changed files with 144 additions and 144 deletions.
11 changes: 5 additions & 6 deletions drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
#define COMEDI_NUM_BOARD_MINORS 0x30
#define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS

typedef struct comedi_driver_struct comedi_driver;
typedef struct comedi_lrange_struct comedi_lrange;

typedef struct device device_create_result_type;
Expand Down Expand Up @@ -239,8 +238,8 @@ struct comedi_async {
unsigned int x);
};

struct comedi_driver_struct {
struct comedi_driver_struct *next;
struct comedi_driver {
struct comedi_driver *next;

const char *driver_name;
struct module *module;
Expand All @@ -256,7 +255,7 @@ struct comedi_driver_struct {

struct comedi_device {
int use_count;
comedi_driver *driver;
struct comedi_driver *driver;
void *private;

device_create_result_type *class_dev;
Expand Down Expand Up @@ -343,8 +342,8 @@ static inline struct comedi_subdevice *comedi_get_write_subdevice(

void comedi_device_detach(struct comedi_device *dev);
int comedi_device_attach(struct comedi_device *dev, comedi_devconfig *it);
int comedi_driver_register(comedi_driver *);
int comedi_driver_unregister(comedi_driver *);
int comedi_driver_register(struct comedi_driver *);
int comedi_driver_unregister(struct comedi_driver *);

void init_polling(void);
void cleanup_polling(void);
Expand Down
18 changes: 9 additions & 9 deletions drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
static int postconfig(struct comedi_device *dev);
static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data);
static void *comedi_recognize(comedi_driver * driv, const char *name);
static void comedi_report_boards(comedi_driver *driv);
static void *comedi_recognize(struct comedi_driver * driv, const char *name);
static void comedi_report_boards(struct comedi_driver *driv);
static int poll_invalid(struct comedi_device *dev, struct comedi_subdevice *s);
int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned long new_size);

comedi_driver *comedi_drivers;
struct comedi_driver *comedi_drivers;

int comedi_modprobe(int minor)
{
Expand Down Expand Up @@ -115,7 +115,7 @@ void comedi_device_detach(struct comedi_device *dev)

int comedi_device_attach(struct comedi_device *dev, comedi_devconfig *it)
{
comedi_driver *driv;
struct comedi_driver *driv;
int ret;

if (dev->attached)
Expand Down Expand Up @@ -180,17 +180,17 @@ int comedi_device_attach(struct comedi_device *dev, comedi_devconfig *it)
return 0;
}

int comedi_driver_register(comedi_driver *driver)
int comedi_driver_register(struct comedi_driver *driver)
{
driver->next = comedi_drivers;
comedi_drivers = driver;

return 0;
}

int comedi_driver_unregister(comedi_driver *driver)
int comedi_driver_unregister(struct comedi_driver *driver)
{
comedi_driver *prev;
struct comedi_driver *prev;
int i;

/* check for devices using this driver */
Expand Down Expand Up @@ -298,7 +298,7 @@ static int postconfig(struct comedi_device *dev)
}

/* generic recognize function for drivers that register their supported board names */
void *comedi_recognize(comedi_driver * driv, const char *name)
void *comedi_recognize(struct comedi_driver * driv, const char *name)
{
unsigned i;
const char *const *name_ptr = driv->board_name;
Expand All @@ -313,7 +313,7 @@ void *comedi_recognize(comedi_driver * driv, const char *name)
return NULL;
}

void comedi_report_boards(comedi_driver *driv)
void comedi_report_boards(struct comedi_driver *driv)
{
unsigned int i;
const char *const *name_ptr;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/8255.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct subdev_8255_struct {

static int dev_8255_attach(struct comedi_device *dev, comedi_devconfig * it);
static int dev_8255_detach(struct comedi_device *dev);
static comedi_driver driver_8255 = {
static struct comedi_driver driver_8255 = {
driver_name:"8255",
module:THIS_MODULE,
attach:dev_8255_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/acl7225b.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static const boardtype boardtypes[] = {
#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
#define this_board ((const boardtype *)dev->board_ptr)

static comedi_driver driver_acl7225b = {
static struct comedi_driver driver_acl7225b = {
driver_name:"acl7225b",
module:THIS_MODULE,
attach:acl7225b_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/addi-data/addi_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2527,7 +2527,7 @@ static const boardtype boardtypes[] = {

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

comedi_driver driver_addi = {
struct comedi_driver driver_addi = {
driver_name:"addi_common",
module:THIS_MODULE,
attach:i_ADDI_Attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci6208.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static int pci6208_detach(struct comedi_device * dev);
#define pci6208_board_nbr \
(sizeof(pci6208_boards) / sizeof(pci6208_board))

static comedi_driver driver_pci6208 = {
static struct comedi_driver driver_pci6208 = {
driver_name:PCI6208_DRIVER_NAME,
module:THIS_MODULE,
attach:pci6208_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci7296.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ typedef struct {

static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it);
static int adl_pci7296_detach(struct comedi_device * dev);
static comedi_driver driver_adl_pci7296 = {
static struct comedi_driver driver_adl_pci7296 = {
driver_name:"adl_pci7296",
module:THIS_MODULE,
attach:adl_pci7296_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci7432.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef struct {

static int adl_pci7432_attach(struct comedi_device * dev, comedi_devconfig * it);
static int adl_pci7432_detach(struct comedi_device * dev);
static comedi_driver driver_adl_pci7432 = {
static struct comedi_driver driver_adl_pci7432 = {
driver_name:"adl_pci7432",
module:THIS_MODULE,
attach:adl_pci7432_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci8164.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ typedef struct {

static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it);
static int adl_pci8164_detach(struct comedi_device * dev);
static comedi_driver driver_adl_pci8164 = {
static struct comedi_driver driver_adl_pci8164 = {
driver_name:"adl_pci8164",
module:THIS_MODULE,
attach:adl_pci8164_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static const pci9111_board_struct pci9111_boards[] = {
#define pci9111_board_nbr \
(sizeof(pci9111_boards)/sizeof(pci9111_board_struct))

static comedi_driver pci9111_driver = {
static struct comedi_driver pci9111_driver = {
driver_name:PCI9111_DRIVER_NAME,
module:THIS_MODULE,
attach:pci9111_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adl_pci9118.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static const boardtype boardtypes[] = {

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

static comedi_driver driver_pci9118 = {
static struct comedi_driver driver_pci9118 = {
driver_name:"adl_pci9118",
module:THIS_MODULE,
attach:pci9118_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adq12b.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ typedef struct{
#define devpriv ((adq12b_private *)dev->private)

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int adq12b_attach(struct comedi_device *dev,comedi_devconfig *it);
static int adq12b_detach(struct comedi_device *dev);
static comedi_driver driver_adq12b={
static struct comedi_driver driver_adq12b={
driver_name: "adq12b",
module: THIS_MODULE,
attach: adq12b_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adv_pci1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static const boardtype boardtypes[] = {

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

static comedi_driver driver_pci1710 = {
static struct comedi_driver driver_pci1710 = {
.driver_name = DRV_NAME,
.module = THIS_MODULE,
.attach = pci1710_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adv_pci1723.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static DEFINE_PCI_DEVICE_TABLE(pci1723_pci_table) = {
MODULE_DEVICE_TABLE(pci, pci1723_pci_table);

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
Expand All @@ -148,7 +148,7 @@ static int pci1723_detach(struct comedi_device * dev);

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

static comedi_driver driver_pci1723 = {
static struct comedi_driver driver_pci1723 = {
driver_name:"adv_pci1723",
module:THIS_MODULE,
attach:pci1723_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/adv_pci_dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static const boardtype boardtypes[] = {

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

static comedi_driver driver_pci_dio = {
static struct comedi_driver driver_pci_dio = {
driver_name:"adv_pci_dio",
module:THIS_MODULE,
attach:pci_dio_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/aio_aio12_8.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ static int aio_aio12_8_detach(struct comedi_device * dev)
return 0;
}

static comedi_driver driver_aio_aio12_8 = {
static struct comedi_driver driver_aio_aio12_8 = {
driver_name:"aio_aio12_8",
module:THIS_MODULE,
attach:aio_aio12_8_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/aio_iiro_16.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it)

static int aio_iiro_16_detach(struct comedi_device * dev);

static comedi_driver driver_aio_iiro_16 = {
static struct comedi_driver driver_aio_iiro_16 = {
driver_name:"aio_iiro_16",
module:THIS_MODULE,
attach:aio_iiro_16_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,14 @@ typedef struct {
} dio200_subdev_intr;

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int dio200_attach(struct comedi_device * dev, comedi_devconfig * it);
static int dio200_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_dio200 = {
static struct comedi_driver driver_amplc_dio200 = {
driver_name:DIO200_DRIVER_NAME,
module:THIS_MODULE,
attach:dio200_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/amplc_pc236.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ typedef struct {
#define devpriv ((pc236_private *)dev->private)

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int pc236_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pc236_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pc236 = {
static struct comedi_driver driver_amplc_pc236 = {
driver_name:PC236_DRIVER_NAME,
module:THIS_MODULE,
attach:pc236_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/amplc_pc263.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ typedef struct {
#endif /* CONFIG_COMEDI_PCI */

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int pc263_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pc263_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pc263 = {
static struct comedi_driver driver_amplc_pc263 = {
driver_name:PC263_DRIVER_NAME,
module:THIS_MODULE,
attach:pc263_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/amplc_pci224.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,14 +421,14 @@ typedef struct {
#define devpriv ((pci224_private *)dev->private)

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int pci224_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci224_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pci224 = {
static struct comedi_driver driver_amplc_pci224 = {
driver_name:DRIVER_NAME,
module:THIS_MODULE,
attach:pci224_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/amplc_pci230.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,14 @@ static const comedi_lrange pci230_ao_range = { 2, {
static const unsigned char pci230_ao_bipolar[2] = { 0, 1 };

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int pci230_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci230_detach(struct comedi_device * dev);
static comedi_driver driver_amplc_pci230 = {
static struct comedi_driver driver_amplc_pci230 = {
driver_name:"amplc_pci230",
module:THIS_MODULE,
attach:pci230_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/c6xdigio.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ union encvaluetype {

static int c6xdigio_attach(struct comedi_device * dev, comedi_devconfig * it);
static int c6xdigio_detach(struct comedi_device * dev);
comedi_driver driver_c6xdigio = {
struct comedi_driver driver_c6xdigio = {
driver_name:"c6xdigio",
module:THIS_MODULE,
attach:c6xdigio_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/cb_das16_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ typedef struct {

static int das16cs_attach(struct comedi_device * dev, comedi_devconfig * it);
static int das16cs_detach(struct comedi_device * dev);
static comedi_driver driver_das16cs = {
static struct comedi_driver driver_das16cs = {
driver_name:"cb_das16_cs",
module:THIS_MODULE,
attach:das16cs_attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/cb_pcidas.c
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,14 @@ typedef struct {
#define devpriv ((cb_pcidas_private *)dev->private)

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static int cb_pcidas_attach(struct comedi_device * dev, comedi_devconfig * it);
static int cb_pcidas_detach(struct comedi_device * dev);
static comedi_driver driver_cb_pcidas = {
static struct comedi_driver driver_cb_pcidas = {
driver_name:"cb_pcidas",
module:THIS_MODULE,
attach:cb_pcidas_attach,
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/cb_pcidas64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ static inline pcidas64_private *priv(struct comedi_device * dev)
*/
static int attach(struct comedi_device * dev, comedi_devconfig * it);
static int detach(struct comedi_device * dev);
static comedi_driver driver_cb_pcidas = {
static struct comedi_driver driver_cb_pcidas = {
driver_name:"cb_pcidas64",
module:THIS_MODULE,
attach:attach,
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/cb_pcidda.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ static void cb_pcidda_calibrate(struct comedi_device * dev, unsigned int channel
unsigned int range);

/*
* The comedi_driver structure tells the Comedi core module
* The struct comedi_driver structure tells the Comedi core module
* which functions to call to configure/deconfigure (attach/detach)
* the board, and also about the kernel module that contains
* the device code.
*/
static comedi_driver driver_cb_pcidda = {
static struct comedi_driver driver_cb_pcidda = {
driver_name:"cb_pcidda",
module:THIS_MODULE,
attach:cb_pcidda_attach,
Expand Down
Loading

0 comments on commit 139dfbd

Please sign in to comment.