/* Allocate buffer for sysex message and prepare header.  */
char* line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, int code2, int size)
/* Allocate buffer for sysex message and prepare header.  */
char* line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1, int code2, int size)
{
	char *buffer = kmalloc(size + SYSEX_EXTRA_SIZE, GFP_KERNEL);
	if (!buffer) {
		dev_err(line6->ifcdev, "out of memory\n");
		return NULL;
	}
	buffer[0] = LINE6_SYSEX_BEGIN;
	memcpy(buffer + 1, line6_midi_id, sizeof(line6_midi_id));
	buffer[sizeof(line6_midi_id) + 1] = code1;
	buffer[sizeof(line6_midi_id) + 2] = code2;
	buffer[sizeof(line6_midi_id) + 3 + size] = LINE6_SYSEX_END;
	return buffer;
}