The dev->board_name is initialized by the comedi core before calling
the (*attach) or (*auto_attach) functions. It only needs to be updated
if the driver does any additional probing and changes the dev->board_ptr.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int ret;
int i;
- dev->board_name = board->name;
-
if (iobase == 0)
return -EINVAL;
if (board->bustype == isa_bustype) {
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
+ const struct labpc_boardinfo *board;
struct labpc_private *devpriv;
unsigned long iobase;
unsigned int irq;
return -ENOMEM;
dev->private = devpriv;
- dev->board_ptr = labpc_pci_find_boardinfo(pcidev);
- if (!dev->board_ptr)
+ board = labpc_pci_find_boardinfo(pcidev);
+ if (!board)
return -ENODEV;
+ dev->board_ptr = board;
+ dev->board_name = board->name;
devpriv->mite = mite_alloc(pcidev);
if (!devpriv->mite)
return -ENOMEM;