Commit 0473c02a authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: dt3000: remove this_board macro

This macro relies on a local variable having a specific name.
Remove it and use the comedi_board() helper to get the pointer.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea869099
...@@ -159,8 +159,6 @@ static const struct dt3k_boardtype dt3k_boardtypes[] = { ...@@ -159,8 +159,6 @@ static const struct dt3k_boardtype dt3k_boardtypes[] = {
}, },
}; };
#define this_board ((const struct dt3k_boardtype *)dev->board_ptr)
#define DT3000_SIZE (4*0x1000) #define DT3000_SIZE (4*0x1000)
/* dual-ported RAM location definitions */ /* dual-ported RAM location definitions */
...@@ -410,6 +408,7 @@ static void dt3k_ai_empty_fifo(struct comedi_device *dev, ...@@ -410,6 +408,7 @@ static void dt3k_ai_empty_fifo(struct comedi_device *dev,
static int dt3k_ai_cmdtest(struct comedi_device *dev, static int dt3k_ai_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd) struct comedi_subdevice *s, struct comedi_cmd *cmd)
{ {
const struct dt3k_boardtype *this_board = comedi_board(dev);
int err = 0; int err = 0;
int tmp; int tmp;
...@@ -796,6 +795,7 @@ static struct pci_dev *dt3000_find_pci_dev(struct comedi_device *dev, ...@@ -796,6 +795,7 @@ static struct pci_dev *dt3000_find_pci_dev(struct comedi_device *dev,
static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ {
const struct dt3k_boardtype *this_board;
struct dt3k_private *devpriv; struct dt3k_private *devpriv;
struct pci_dev *pcidev; struct pci_dev *pcidev;
struct comedi_subdevice *s; struct comedi_subdevice *s;
...@@ -813,6 +813,7 @@ static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -813,6 +813,7 @@ static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (!pcidev) if (!pcidev)
return -EIO; return -EIO;
comedi_set_hw_dev(dev, &pcidev->dev); comedi_set_hw_dev(dev, &pcidev->dev);
this_board = comedi_board(dev);
ret = comedi_pci_enable(pcidev, "dt3000"); ret = comedi_pci_enable(pcidev, "dt3000");
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment