/* return 1 -> Reg written 0 -> usbvision is not yet ready -1 -> Something went wrong  */
int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, unsigned char value)
/* return 1 -> Reg written 0 -> usbvision is not yet ready -1 -> Something went wrong  */
int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, unsigned char value)
{
	int errCode = 0;
	if (!USBVISION_IS_OPERATIONAL(usbvision))
		return 0;
	errCode = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1),
				USBVISION_OP_CODE,
				USB_DIR_OUT | USB_TYPE_VENDOR |
				USB_RECIP_ENDPOINT, 0, (__u16) reg, &value, 1, HZ);
	if (errCode < 0) {
		dev_err(&usbvision->dev->dev,
			"%s: failed: error %d\n", __func__, errCode);
	}
	return errCode;
}