Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1434008 > unrolled thread

[PATCH] staging: comedi: daqboard2000: bug fix board type matching code

Started byIan Abbott <abbotti@mev.co.uk>
First post2016-06-29 21:30 +0200
Last post2016-06-29 21:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: comedi: daqboard2000: bug fix board type matching code Ian Abbott <abbotti@mev.co.uk> - 2016-06-29 21:30 +0200

#1434008 — [PATCH] staging: comedi: daqboard2000: bug fix board type matching code

FromIan Abbott <abbotti@mev.co.uk>
Date2016-06-29 21:30 +0200
Subject[PATCH] staging: comedi: daqboard2000: bug fix board type matching code
Message-ID<rPtlo-8bY-31@gated-at.bofh.it>
`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: 7e8401b23e7f ("staging: comedi: daqboard2000: add back
subsystem_device check")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: <stable@vger.kernel.org> # 3.7+
---
 drivers/staging/comedi/drivers/daqboard2000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 65daef0..0f4eb95 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -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++) {
-- 
2.8.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web