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

staging: comedi: ni_daq_dio24: remove thisboard macro

The 'thisboard' macro relies on a local variable having a specific
name and yields a pointer derived from that local variable.

Replace the macro with a local variable 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 25602bd7
...@@ -83,11 +83,6 @@ static const struct dio24_board_struct dio24_boards[] = { ...@@ -83,11 +83,6 @@ static const struct dio24_board_struct dio24_boards[] = {
}, },
}; };
/*
* Useful for shorthand access to the particular board structure
*/
#define thisboard ((const struct dio24_board_struct *)dev->board_ptr)
struct dio24_private { struct dio24_private {
int data; /* number of data points left to be taken */ int data; /* number of data points left to be taken */
...@@ -95,6 +90,7 @@ struct dio24_private { ...@@ -95,6 +90,7 @@ struct dio24_private {
static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{ {
const struct dio24_board_struct *thisboard = comedi_board(dev);
struct dio24_private *devpriv; struct dio24_private *devpriv;
struct comedi_subdevice *s; struct comedi_subdevice *s;
unsigned long iobase = 0; unsigned long iobase = 0;
...@@ -159,6 +155,7 @@ static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -159,6 +155,7 @@ static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static void dio24_detach(struct comedi_device *dev) static void dio24_detach(struct comedi_device *dev)
{ {
const struct dio24_board_struct *thisboard = comedi_board(dev);
struct comedi_subdevice *s; struct comedi_subdevice *s;
if (dev->subdevices) { if (dev->subdevices) {
......
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