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

staging: comedi: ni_pcidio: remove this_board macro

This macro relies on a local variable having a specific name and
derives a pointer from that local variable.

It's only used in the attach and we already have the local variable
'board' that has the same information. Use that instead.
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 e69e860e
...@@ -304,8 +304,6 @@ static const struct nidio_board nidio_boards[] = { ...@@ -304,8 +304,6 @@ static const struct nidio_board nidio_boards[] = {
}, },
}; };
#define this_board ((const struct nidio_board *)dev->board_ptr)
struct nidio96_private { struct nidio96_private {
struct mite_struct *mite; struct mite_struct *mite;
int boardtype; int boardtype;
...@@ -1112,7 +1110,7 @@ static int nidio_auto_attach(struct comedi_device *dev, ...@@ -1112,7 +1110,7 @@ static int nidio_auto_attach(struct comedi_device *dev,
if (!board) if (!board)
return -ENODEV; return -ENODEV;
dev->board_ptr = board; dev->board_ptr = board;
dev->board_name = this_board->name; dev->board_name = board->name;
devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv) if (!devpriv)
...@@ -1136,7 +1134,7 @@ static int nidio_auto_attach(struct comedi_device *dev, ...@@ -1136,7 +1134,7 @@ static int nidio_auto_attach(struct comedi_device *dev,
return -ENOMEM; return -ENOMEM;
irq = mite_irq(devpriv->mite); irq = mite_irq(devpriv->mite);
if (this_board->uses_firmware) { if (board->uses_firmware) {
ret = pci_6534_upload_firmware(dev); ret = pci_6534_upload_firmware(dev);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
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