From: Frank Mori Hess Date: Fri, 4 May 2001 22:19:33 +0000 (+0000) Subject: bug fixes, seems to work X-Git-Tag: r0_7_59~75 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ce4b51aaf67bfe97927ed9c097ddc3c9da3e0eb;p=comedi.git bug fixes, seems to work --- diff --git a/comedi/drivers/comedi_rt_timer.c b/comedi/drivers/comedi_rt_timer.c index 53bcdf11..ada553e4 100644 --- a/comedi/drivers/comedi_rt_timer.c +++ b/comedi/drivers/comedi_rt_timer.c @@ -238,17 +238,12 @@ static int timer_cmd(comedi_device *dev,comedi_subdevice *s) ts.tv_nsec=cmd->scan_begin_arg; #ifdef CONFIG_COMEDI_RTL - // XXX timespec_to_RTIME() is undeclared (and undefined?) compiling against rtl3.0 - FMH - period=timespec_to_RTIME(ts); + period=HRT_TO_8254(cmd->scan_begin_arg); rt_task_init(&devpriv->rt_task,timer_ai_task_func,(int)dev,3000,4); #endif #ifdef CONFIG_COMEDI_RTAI period = start_rt_timer(nano2count(cmd->scan_begin_arg)); - // XXX line repeated a few lines down? - FMH - now = rt_get_time(); rt_task_init(&devpriv->rt_task,timer_ai_task_func,(int)dev,3000,0,0,0); - // XXX line repeated a few lines down? - FMH - rt_task_make_periodic(&devpriv->rt_task,now+period,period); #endif now=rt_get_time(); @@ -272,6 +267,7 @@ static int timer_attach(comedi_device *dev,comedi_devconfig *it) comedi_subdevice *s; printk("comedi%d: timer: ",dev->minor); + dev->board_name="timer"; dev->n_subdevices=1; @@ -283,10 +279,13 @@ static int timer_attach(comedi_device *dev,comedi_devconfig *it) devpriv->device=it->options[0]; devpriv->subd=it->options[1]; + printk("device %d, subdevice %d\n", devpriv->device, devpriv->subd); + devpriv->dev=comedi_get_device_by_minor(devpriv->device); devpriv->s=devpriv->dev->subdevices+devpriv->subd; s=dev->subdevices+0; + dev->read_subdev = s; s->type=COMEDI_SUBD_AI; s->subdev_flags=SDF_READABLE; s->n_chan=devpriv->s->n_chan;