void crypt_set_log_callback(struct crypt_device *cd,
	void (*log)(int level, const char *msg, void *usrptr),
	void *usrptr)
{
	if (!cd) {
		_default_log = log;
		_default_log_usrptr = usrptr;
	} else {
		cd->log = log;
		cd->log_usrptr = usrptr;
	}
}
void crypt_set_log_callback(struct crypt_device *cd,
	void (*log)(int level, const char *msg, void *usrptr),
	void *usrptr)
{
	if (!cd) {
		_default_log = log;
		_default_log_usrptr = usrptr;
	} else {
		cd->log = log;
		cd->log_usrptr = usrptr;
	}
}