The dev_info() showing the board id is just extra noise.
Remove it but make sure the probed id is correct. Rename the CamelCase
define used for the id register.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
#include "mite.h"
#define Port_Register(x) (0x00+(x))
-#define ID_Register 0x06
+#define NI6527_ID_REG 0x06
#define Clear_Register 0x07
#define ClrEdge 0x08
return ret;
}
- dev_info(dev->class_dev, "board: %s, ID=0x%02x\n", dev->board_name,
- readb(devpriv->mite->daq_io_addr + ID_Register));
+ /* make sure this is actually a 6527 device */
+ if (readb(devpriv->mite->daq_io_addr + NI6527_ID_REG) != 0x27)
+ return -ENODEV;
ret = comedi_alloc_subdevices(dev, 3);
if (ret)