Skip to content

Commit

Permalink
Staging: comedi: Remove comedi_devconfig 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 063db04 commit 0707bb0
Show file tree
Hide file tree
Showing 109 changed files with 225 additions and 226 deletions.
5 changes: 2 additions & 3 deletions drivers/staging/comedi/comedi.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ enum comedi_support_level {
/* ioctls */

#define CIO 'd'
#define COMEDI_DEVCONFIG _IOW(CIO, 0, comedi_devconfig)
#define COMEDI_DEVCONFIG _IOW(CIO, 0, struct comedi_devconfig)
#define COMEDI_DEVINFO _IOR(CIO, 1, struct comedi_devinfo)
#define COMEDI_SUBDINFO _IOR(CIO, 2, struct comedi_subdinfo)
#define COMEDI_CHANINFO _IOR(CIO, 3, struct comedi_chaninfo)
Expand All @@ -310,7 +310,6 @@ enum comedi_support_level {

/* structures */

typedef struct comedi_devconfig_struct comedi_devconfig;
typedef struct comedi_rangeinfo_struct comedi_rangeinfo;
typedef struct comedi_krange_struct comedi_krange;
typedef struct comedi_bufconfig_struct comedi_bufconfig;
Expand Down Expand Up @@ -415,7 +414,7 @@ struct comedi_devinfo {
int unused[30];
};

struct comedi_devconfig_struct {
struct comedi_devconfig {
char board_name[COMEDI_NAMELEN];
int options[COMEDI_NDEVCONFOPTS];
};
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static struct comedi_device_file_info
*comedi_file_info_table[COMEDI_NUM_MINORS];

static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg);
static int do_devconfig_ioctl(struct comedi_device *dev, struct comedi_devconfig *arg);
static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg);
static int do_devinfo_ioctl(struct comedi_device *dev, struct comedi_devinfo *arg,
struct file *file);
Expand Down Expand Up @@ -192,9 +192,9 @@ static int comedi_ioctl(struct inode *inode, struct file *file,
writes:
none
*/
static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg)
static int do_devconfig_ioctl(struct comedi_device *dev, struct comedi_devconfig *arg)
{
comedi_devconfig it;
struct comedi_devconfig it;
int ret;
unsigned char *aux_data = NULL;
int aux_len;
Expand All @@ -213,7 +213,7 @@ static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg)
return 0;
}

if (copy_from_user(&it, arg, sizeof(comedi_devconfig)))
if (copy_from_user(&it, arg, sizeof(struct comedi_devconfig)))
return -EFAULT;

it.board_name[COMEDI_NAMELEN - 1] = 0;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ struct comedi_driver {

const char *driver_name;
struct module *module;
int (*attach) (struct comedi_device *, comedi_devconfig *);
int (*attach) (struct comedi_device *, struct comedi_devconfig *);
int (*detach) (struct comedi_device *);

/* number of elements in board_name and board_id arrays */
Expand Down Expand Up @@ -337,7 +337,7 @@ 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_device_attach(struct comedi_device *dev, struct comedi_devconfig *it);
int comedi_driver_register(struct comedi_driver *);
int comedi_driver_unregister(struct comedi_driver *);

Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void comedi_device_detach(struct comedi_device *dev)
__comedi_device_detach(dev);
}

int comedi_device_attach(struct comedi_device *dev, comedi_devconfig *it)
int comedi_device_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct comedi_driver *driv;
int ret;
Expand Down Expand Up @@ -791,7 +791,7 @@ void comedi_reset_async_buf(struct comedi_async *async)

int comedi_auto_config(struct device *hardware_device, const char *board_name, const int *options, unsigned num_options)
{
comedi_devconfig it;
struct comedi_devconfig it;
int minor;
struct comedi_device_file_info *dev_file_info;
int retval;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/8255.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct subdev_8255_struct {
#define CALLBACK_FUNC (((struct subdev_8255_struct *)s->private)->cb_func)
#define subdevpriv ((struct subdev_8255_struct *)s->private)

static int dev_8255_attach(struct comedi_device *dev, comedi_devconfig * it);
static int dev_8255_attach(struct comedi_device *dev, struct comedi_devconfig * it);
static int dev_8255_detach(struct comedi_device *dev);
static struct comedi_driver driver_8255 = {
driver_name:"8255",
Expand Down Expand Up @@ -374,7 +374,7 @@ void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice * s)
*/

static int dev_8255_attach(struct comedi_device *dev, comedi_devconfig * it)
static int dev_8255_attach(struct comedi_device *dev, struct comedi_devconfig * it)
{
int ret;
unsigned long iobase;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/acl7225b.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Devices: [Adlink] ACL-7225b (acl7225b), [ICP] P16R16DIO (p16r16dio)
#define ACL7225_DI_LO 2 /* Digital input low byte (DI0-DI7) */
#define ACL7225_DI_HI 3 /* Digital input high byte (DI8-DI15) */

static int acl7225b_attach(struct comedi_device *dev, comedi_devconfig * it);
static int acl7225b_attach(struct comedi_device *dev, struct comedi_devconfig * it);
static int acl7225b_detach(struct comedi_device *dev);

typedef struct {
Expand Down Expand Up @@ -83,7 +83,7 @@ static int acl7225b_di_insn(struct comedi_device *dev, struct comedi_subdevice *
return 2;
}

static int acl7225b_attach(struct comedi_device *dev, comedi_devconfig * it)
static int acl7225b_attach(struct comedi_device *dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int iobase, iorange;
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/comedi/drivers/addi-data/addi_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2542,7 +2542,7 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
/*
+----------------------------------------------------------------------------+
| Function name :static int i_ADDI_Attach(struct comedi_device *dev, |
| comedi_devconfig *it) |
| struct comedi_devconfig *it) |
| |
+----------------------------------------------------------------------------+
| Task :Detects the card. |
Expand All @@ -2551,15 +2551,15 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
| allocation of data structures for the driver. |
+----------------------------------------------------------------------------+
| Input Parameters :struct comedi_device *dev |
| comedi_devconfig *it |
| struct comedi_devconfig *it |
| |
+----------------------------------------------------------------------------+
| Return Value : 0 |
| |
+----------------------------------------------------------------------------+
*/

static int i_ADDI_Attach(struct comedi_device * dev, comedi_devconfig * it)
static int i_ADDI_Attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int ret, pages, i, n_subdevices;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/addi-data/addi_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ typedef struct {
static unsigned short pci_list_builded; /* set to 1 when list of card is known */

/* Function declarations */
static int i_ADDI_Attach(struct comedi_device *dev, comedi_devconfig *it);
static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it);
static int i_ADDI_Detach(struct comedi_device *dev);
static int i_ADDI_Reset(struct comedi_device *dev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adl_pci6208.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ typedef struct {

#define devpriv ((pci6208_private *)dev->private)

static int pci6208_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci6208_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci6208_detach(struct comedi_device * dev);

#define pci6208_board_nbr \
Expand Down Expand Up @@ -142,7 +142,7 @@ static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice
* in the driver structure, dev->board_ptr contains that
* address.
*/
static int pci6208_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci6208_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int retval;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adl_pci7296.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ typedef struct {

#define devpriv ((adl_pci7296_private *)dev->private)

static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it);
static int adl_pci7296_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int adl_pci7296_detach(struct comedi_device * dev);
static struct comedi_driver driver_adl_pci7296 = {
driver_name:"adl_pci7296",
Expand All @@ -72,7 +72,7 @@ static struct comedi_driver driver_adl_pci7296 = {
detach:adl_pci7296_detach,
};

static int adl_pci7296_attach(struct comedi_device * dev, comedi_devconfig * it)
static int adl_pci7296_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct pci_dev *pcidev;
struct comedi_subdevice *s;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adl_pci7432.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef struct {

#define devpriv ((adl_pci7432_private *)dev->private)

static int adl_pci7432_attach(struct comedi_device * dev, comedi_devconfig * it);
static int adl_pci7432_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int adl_pci7432_detach(struct comedi_device * dev);
static struct comedi_driver driver_adl_pci7432 = {
driver_name:"adl_pci7432",
Expand All @@ -77,7 +77,7 @@ static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_su

/* */

static int adl_pci7432_attach(struct comedi_device * dev, comedi_devconfig * it)
static int adl_pci7432_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct pci_dev *pcidev;
struct comedi_subdevice *s;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adl_pci8164.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ typedef struct {

#define devpriv ((adl_pci8164_private *)dev->private)

static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it);
static int adl_pci8164_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int adl_pci8164_detach(struct comedi_device * dev);
static struct comedi_driver driver_adl_pci8164 = {
driver_name:"adl_pci8164",
Expand Down Expand Up @@ -103,7 +103,7 @@ static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);

static int adl_pci8164_attach(struct comedi_device * dev, comedi_devconfig * it)
static int adl_pci8164_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct pci_dev *pcidev;
struct comedi_subdevice *s;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Configuration options:
// Function prototypes
//

static int pci9111_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci9111_detach(struct comedi_device * dev);
static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index);
Expand Down Expand Up @@ -1246,7 +1246,7 @@ static int pci9111_reset(struct comedi_device * dev)
// - Declare device driver capability
//

static int pci9111_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *subdevice;
unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adl_pci9118.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static const struct comedi_lrange range_pci9118hg = { 8, {

#define PCI9118_BIPOLAR_RANGES 4 /* used for test on mixture of BIP/UNI ranges */

static int pci9118_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci9118_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci9118_detach(struct comedi_device * dev);

typedef struct {
Expand Down Expand Up @@ -1835,7 +1835,7 @@ static int pci9118_reset(struct comedi_device * dev)
/*
==============================================================================
*/
static int pci9118_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci9118_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int ret, pages, i;
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 @@ -162,7 +162,7 @@ typedef struct{
* 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_attach(struct comedi_device *dev,struct comedi_devconfig *it);
static int adq12b_detach(struct comedi_device *dev);
static struct comedi_driver driver_adq12b={
driver_name: "adq12b",
Expand All @@ -184,7 +184,7 @@ static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice
* in the driver structure, dev->board_ptr contains that
* address.
*/
static int adq12b_attach(struct comedi_device *dev,comedi_devconfig *it)
static int adq12b_attach(struct comedi_device *dev,struct comedi_devconfig *it)
{
struct comedi_subdevice *s;
unsigned long iobase;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/adv_pci1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ static const struct comedi_lrange range_pci171x_da = { 2, {
}
};

static int pci1710_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci1710_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci1710_detach(struct comedi_device * dev);

typedef struct {
Expand Down Expand Up @@ -1316,7 +1316,7 @@ static int pci1710_reset(struct comedi_device * dev)
/*
==============================================================================
*/
static int pci1710_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci1710_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int ret, subdev, n_subdevices;
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 @@ -143,7 +143,7 @@ MODULE_DEVICE_TABLE(pci, pci1723_pci_table);
* the board, and also about the kernel module that contains
* the device code.
*/
static int pci1723_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci1723_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci1723_detach(struct comedi_device * dev);

#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
Expand Down Expand Up @@ -294,7 +294,7 @@ static int pci1723_dio_insn_bits(struct comedi_device * dev, struct comedi_subde
* Attach is called by the Comedi core to configure the driver
* for a pci1723 board.
*/
static int pci1723_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci1723_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int ret, subdev, n_subdevices;
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/comedi/drivers/adv_pci_dio.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ typedef enum {

#define OMBCMD_RETRY 0x03 /* 3 times try request before error */

static int pci_dio_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pci_dio_attach(struct comedi_device * dev, struct comedi_devconfig * it);
static int pci_dio_detach(struct comedi_device * dev);

typedef struct {
Expand Down Expand Up @@ -750,7 +750,7 @@ static int pci_dio_reset(struct comedi_device * dev)
/*
==============================================================================
*/
static int pci1760_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci1760_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int subdev = 0;
Expand Down Expand Up @@ -857,7 +857,7 @@ static int pci_dio_add_do(struct comedi_device * dev, struct comedi_subdevice *
/*
==============================================================================
*/
static int CheckAndAllocCard(struct comedi_device * dev, comedi_devconfig * it,
static int CheckAndAllocCard(struct comedi_device * dev, struct comedi_devconfig * it,
struct pci_dev *pcidev)
{
pci_dio_private *pr, *prev;
Expand All @@ -883,7 +883,7 @@ static int CheckAndAllocCard(struct comedi_device * dev, comedi_devconfig * it,
/*
==============================================================================
*/
static int pci_dio_attach(struct comedi_device * dev, comedi_devconfig * it)
static int pci_dio_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
struct comedi_subdevice *s;
int ret, subdev, n_subdevices, i, j;
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 @@ -161,7 +161,7 @@ static const struct comedi_lrange range_aio_aio12_8 = {
}
};

static int aio_aio12_8_attach(struct comedi_device * dev, comedi_devconfig * it)
static int aio_aio12_8_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
int iobase;
struct comedi_subdevice *s;
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/aio_iiro_16.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ typedef struct {

#define devpriv ((aio_iiro_16_private *) dev->private)

static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it);
static int aio_iiro_16_attach(struct comedi_device * dev, struct comedi_devconfig * it);

static int aio_iiro_16_detach(struct comedi_device * dev);

Expand All @@ -87,7 +87,7 @@ static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);

static int aio_iiro_16_attach(struct comedi_device * dev, comedi_devconfig * it)
static int aio_iiro_16_attach(struct comedi_device * dev, struct comedi_devconfig * it)
{
int iobase;
struct comedi_subdevice *s;
Expand Down
Loading

0 comments on commit 0707bb0

Please sign in to comment.