/* return < 0 -> Error >= 0 -> Data  */
int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg)
/* return < 0 -> Error >= 0 -> Data  */
int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg)
{
	int errCode = 0;
	unsigned char buffer[1];
	if (!USBVISION_IS_OPERATIONAL(usbvision))
		return -1;
	errCode = usb_control_msg(usbvision->dev, usb_rcvctrlpipe(usbvision->dev, 1),
				USBVISION_OP_CODE,
				USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT,
				0, (__u16) reg, buffer, 1, HZ);
	if (errCode < 0) {
		dev_err(&usbvision->dev->dev,
			"%s: failed: error %d\n", __func__, errCode);
		return errCode;
	}
	return buffer[0];
}