Skip to content

Commit

Permalink
staging: comedi: daqboard2000: bug fix board type matching code
Browse files Browse the repository at this point in the history
`daqboard2000_find_boardinfo()` is supposed to check if the
DaqBoard/2000 series model is supported, based on the PCI subvendor and
subdevice ID.  The current code is wrong as it is comparing the PCI
device's subdevice ID to an expected, fixed value for the subvendor ID.
It should be comparing the PCI device's subvendor ID to this fixed
value.  Correct it.

Fixes: 7e8401b ("staging: comedi: daqboard2000: add back
subsystem_device check")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.7+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Aug 21, 2016
1 parent 99f1c01 commit 80e162e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/comedi/drivers/daqboard2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev,
const struct daq200_boardtype *board;
int i;

if (pcidev->subsystem_device != PCI_VENDOR_ID_IOTECH)
if (pcidev->subsystem_vendor != PCI_VENDOR_ID_IOTECH)
return NULL;

for (i = 0; i < ARRAY_SIZE(boardtypes); i++) {
Expand Down

0 comments on commit 80e162e

Please sign in to comment.