media: atomisp: relax firmware version detection criteria
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 8 May 2020 10:38:37 +0000 (12:38 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 May 2020 12:51:27 +0000 (14:51 +0200)
As getting the exact version used by the driver is not easy,
let's relax the version detection and hope for the best,
producing just a warning.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/sh_css_firmware.c

index 3ba9a7d..eb3c015 100644 (file)
@@ -196,13 +196,13 @@ sh_css_check_firmware_version(struct device *dev, const char *fw_data)
        file_header = &firmware_header->file_header;
 
        if (strcmp(file_header->version, release_version) != 0) {
-               dev_err(dev, "Fw version check failed. Expecting '%s', firmware is '%s'.\n",
+               dev_err(dev, "Firmware version may not be compatible with this driver\n");
+               dev_err(dev, "Expecting version '%s', but firmware is '%s'.\n",
                        release_version, file_header->version);
-               return false;
-       } else {
-               /* firmware version matches */
-               return true;
        }
+
+       /* For now, let's just accept a wrong version, even if wrong */
+       return true;
 }
 
 enum ia_css_err