Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4467df94 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: Remove pcmmio_subdev_private typedef

parent 97baaedf
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -200,7 +200,7 @@ static const struct pcmmio_board pcmmio_boards[] = {
#define thisboard ((const struct pcmmio_board *)dev->board_ptr)
#define thisboard ((const struct pcmmio_board *)dev->board_ptr)


/* this structure is for data unique to this subdevice.  */
/* this structure is for data unique to this subdevice.  */
typedef struct {
struct pcmmio_subdev_private {


	union {
	union {
		/* for DIO: mapping of halfwords (bytes) in port/chanarray to iobase */
		/* for DIO: mapping of halfwords (bytes) in port/chanarray to iobase */
@@ -233,7 +233,7 @@ typedef struct {
			unsigned int shadow_samples[8];	/* the last unsigned int data written */
			unsigned int shadow_samples[8];	/* the last unsigned int data written */
		} ao;
		} ao;
	};
	};
} pcmmio_subdev_private;
};


/* this structure is for data unique to this hardware driver.  If
/* this structure is for data unique to this hardware driver.  If
   several hardware drivers keep similar information in this structure,
   several hardware drivers keep similar information in this structure,
@@ -249,7 +249,7 @@ typedef struct {
		unsigned int irq;
		unsigned int irq;
		spinlock_t spinlock;
		spinlock_t spinlock;
	} asics[MAX_ASICS];
	} asics[MAX_ASICS];
	pcmmio_subdev_private *sprivs;
	struct pcmmio_subdev_private *sprivs;
} pcmmio_private;
} pcmmio_private;


/*
/*
@@ -257,7 +257,7 @@ typedef struct {
 * access the private structure.
 * access the private structure.
 */
 */
#define devpriv ((pcmmio_private *)dev->private)
#define devpriv ((pcmmio_private *)dev->private)
#define subpriv ((pcmmio_subdev_private *)s->private)
#define subpriv ((struct pcmmio_subdev_private *)s->private)
/*
/*
 * The struct 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)
 * which functions to call to configure/deconfigure (attach/detach)
@@ -372,7 +372,7 @@ static int pcmmio_attach(struct comedi_device * dev, struct comedi_devconfig * i
	n_dio_subdevs = CALC_N_DIO_SUBDEVS(chans_left);
	n_dio_subdevs = CALC_N_DIO_SUBDEVS(chans_left);
	n_subdevs = n_dio_subdevs + 2;
	n_subdevs = n_dio_subdevs + 2;
	devpriv->sprivs =
	devpriv->sprivs =
		kcalloc(n_subdevs, sizeof(pcmmio_subdev_private), GFP_KERNEL);
		kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private), GFP_KERNEL);
	if (!devpriv->sprivs) {
	if (!devpriv->sprivs) {
		printk("cannot allocate subdevice private data structures\n");
		printk("cannot allocate subdevice private data structures\n");
		return -ENOMEM;
		return -ENOMEM;