/* This function is called by the kernel when a firmware is made available, or if it times out waiting for the firmware.  */
static void uart_firmware_cont(const struct firmware *fw, void *context)
/* This function is called by the kernel when a firmware is made available, or if it times out waiting for the firmware.  */
static void uart_firmware_cont(const struct firmware *fw, void *context)
{
	struct qe_firmware *firmware;
	struct device *dev = context;
	int ret;
	if (!fw) {
		dev_err(dev, "firmware not found\n");
		return;
	}
	firmware = (struct qe_firmware *) fw->data;
	if (firmware->header.length != fw->size) {
		dev_err(dev, "invalid firmware\n");
		goto out;
	}
	ret = qe_upload_firmware(firmware);
	if (ret) {
		dev_err(dev, "could not load firmware\n");
		goto out;
	}
	firmware_loaded = 1;
 out:
	release_firmware(fw);
}