X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ffx2lafw%2Ffx2lafw.c;h=0ea4030d7b1fcffb2f81f191275f43fa3a17fab8;hb=0a8c0c324e16e4848498309dbb2efd27b4c812a9;hp=39f6c1f6729a0729be4d1161dbcdc6ad7d89cc95;hpb=8fdecced96a1e849f5474e57aeca456dd265d9b9;p=libsigrok.git diff --git a/hardware/fx2lafw/fx2lafw.c b/hardware/fx2lafw/fx2lafw.c index 39f6c1f6..0ea4030d 100644 --- a/hardware/fx2lafw/fx2lafw.c +++ b/hardware/fx2lafw/fx2lafw.c @@ -251,11 +251,15 @@ static int fx2lafw_dev_open(int dev_index) break; } - if (vi.major != FX2LAFW_VERSION_MAJOR || - vi.minor != FX2LAFW_VERSION_MINOR) { - sr_err("fx2lafw: Expected firmware version %d.%d " - "got %d.%d.", FX2LAFW_VERSION_MAJOR, - FX2LAFW_VERSION_MINOR, vi.major, vi.minor); + /* + * Changes in major version mean incompatible/API changes, so + * bail out if we encounter an incompatible version. + * Different minor versions are OK, they should be compatible. + */ + if (vi.major != FX2LAFW_REQUIRED_VERSION_MAJOR) { + sr_err("fx2lafw: Expected firmware version %d.x, " + "got %d.%d.", FX2LAFW_REQUIRED_VERSION_MAJOR, + vi.major, vi.minor); break; }