Skip to content

Commit

Permalink
staging: comedi: ni_labpc_cs: remove thisboard macro
Browse files Browse the repository at this point in the history
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 30, 2013
1 parent 6749ffa commit 6e4733c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/staging/comedi/drivers/ni_labpc_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,9 @@ static const struct labpc_board_struct labpc_cs_boards[] = {
},
};

/*
* Useful for shorthand access to the particular board structure
*/
#define thisboard ((const struct labpc_board_struct *)dev->board_ptr)

static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
const struct labpc_board_struct *thisboard = comedi_board(dev);
struct labpc_private *devpriv;
unsigned long iobase = 0;
unsigned int irq = 0;
Expand Down

0 comments on commit 6e4733c

Please sign in to comment.