},
};
-/*
- * Useful for shorthand access to the particular board structure
- */
-#define thisboard ((const struct pcidio_board *)dev->board_ptr)
-
static struct pci_dev *pcidio_find_pci_dev(struct comedi_device *dev,
struct comedi_devconfig *it)
{
static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
+ const struct pcidio_board *thisboard;
struct pci_dev *pcidev;
int i;
int ret;
if (!pcidev)
return -EIO;
comedi_set_hw_dev(dev, &pcidev->dev);
-
-/*
- * Initialize dev->board_name. Note that we can use the "thisboard"
- * macro now, since we just initialized it in the last line.
- */
+ thisboard = comedi_board(dev);
dev->board_name = thisboard->name;
if (comedi_pci_enable(pcidev, thisboard->name))
static void pcidio_detach(struct comedi_device *dev)
{
+ const struct pcidio_board *thisboard = comedi_board(dev);
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
if (pcidev) {