};
-typedef struct {
+struct jr3_pci_subdev_private {
volatile struct jr3_channel *channel;
unsigned long next_time_min;
unsigned long next_time_max;
unsigned int maxdata_list[8 * 7 + 2];
u16 errors;
int retries;
-} jr3_pci_subdev_private;
+};
static struct poll_delay_t poll_delay_min_max(int min, int max)
{
struct comedi_insn * insn, unsigned int * data)
{
int result;
- jr3_pci_subdev_private *p;
+ struct jr3_pci_subdev_private *p;
int channel;
p = s->private;
printk("jr3_pci_open\n");
for (i = 0; i < devpriv->n_channels; i++) {
- jr3_pci_subdev_private *p;
+ struct jr3_pci_subdev_private *p;
p = dev->subdevices[i].private;
if (p) {
struct jr3_pci_dev_private *p = dev->private;
for (i = 0; i < p->n_channels; i++) {
- jr3_pci_subdev_private *sp;
+ struct jr3_pci_subdev_private *sp;
sp = dev->subdevices[i].private;
more = 1;
static struct poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice * s)
{
struct poll_delay_t result = poll_delay_min_max(1000, 2000);
- jr3_pci_subdev_private *p = s->private;
+ struct jr3_pci_subdev_private *p = s->private;
if (p) {
volatile struct jr3_channel *channel = p->channel;
now = jiffies;
// Poll all channels that are ready to be polled
for (i = 0; i < devpriv->n_channels; i++) {
- jr3_pci_subdev_private *subdevpriv = dev->subdevices[i].private;
+ struct jr3_pci_subdev_private *subdevpriv = dev->subdevices[i].private;
if (now > subdevpriv->next_time_min) {
struct poll_delay_t sub_delay;
dev->subdevices[i].n_chan = 8 * 7 + 2;
dev->subdevices[i].insn_read = jr3_pci_ai_insn_read;
dev->subdevices[i].private =
- kzalloc(sizeof(jr3_pci_subdev_private), GFP_KERNEL);
+ kzalloc(sizeof(struct jr3_pci_subdev_private), GFP_KERNEL);
if (dev->subdevices[i].private) {
- jr3_pci_subdev_private *p;
+ struct jr3_pci_subdev_private *p;
int j;
p = dev->subdevices[i].private;
// Start card timer
for (i = 0; i < devpriv->n_channels; i++) {
- jr3_pci_subdev_private *p = dev->subdevices[i].private;
+ struct jr3_pci_subdev_private *p = dev->subdevices[i].private;
p->next_time_min = jiffies + msecs_to_jiffies(500);
p->next_time_max = jiffies + msecs_to_jiffies(2000);