提交 80e162ee 编写于 作者: I Ian Abbott 提交者: Greg Kroah-Hartman

staging: comedi: daqboard2000: bug fix board type matching code

`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: 7e8401b2 ("staging: comedi: daqboard2000: add back
subsystem_device check")
Signed-off-by: NIan Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.7+
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 99f1c013
...@@ -634,7 +634,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev, ...@@ -634,7 +634,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev,
const struct daq200_boardtype *board; const struct daq200_boardtype *board;
int i; int i;
if (pcidev->subsystem_device != PCI_VENDOR_ID_IOTECH) if (pcidev->subsystem_vendor != PCI_VENDOR_ID_IOTECH)
return NULL; return NULL;
for (i = 0; i < ARRAY_SIZE(boardtypes); i++) { for (i = 0; i < ARRAY_SIZE(boardtypes); i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册