Re: Comedi attach

On Thursday 06 January 2005 04:19 am, Lars.Busch_at_gmx.net wrote:
>
>  devpriv->pci_device = pci_device;
>  devpriv->io_range = io_range;
>  devpriv->is_valid=0;
>  devpriv->lcr_io_base=lcr_io_base;
>  devpriv->lcr_io_range=lcr_io_range;
>
> /*
>  * If you can probe the device to determine what device in a series
>  * it is, this is the place to do it.  Otherwise, dev->board_ptr
>  * should already be initialized.
>  */
>  //dev->board_ptr = plx_probe(dev);
>
> /*
>  * Initialize dev->board_name.  Note that we can use the "thisboard"
>  * macro now, since we just initialized it in the last line.
>  */
>  dev->board_name = thisboard->name;
>
> /*
>  * Allocate the private structure area.  alloc_private() is a
>  * convenient macro defined in comedidev.h.
>  */
>  if(alloc_private(dev,sizeof(plx_private_struct))<0)
>       return -ENOMEM;

You're using dev->private before allocating it.

-- 
Frank

Received on 2005-01-06Z13:08:15