[media] siano: store firmware version
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 9 Mar 2013 12:56:27 +0000 (09:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Mar 2013 10:38:16 +0000 (07:38 -0300)
As there are some changes that seem to be firmware-dependent,
we need to store the firmware version, as we don't want to break
support for existing cards that use a legacy (and sometimes
custom) firmware.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/siano/smscoreapi.c
drivers/media/common/siano/smscoreapi.h

index 1dab4b64d395ca387461e248d8f0b93639a1d0ba..7b5d81a30cdfba2a74620589c09e18c2641ab955 100644 (file)
@@ -1359,6 +1359,8 @@ void smscore_onresponse(struct smscore_device_t *coredev,
                        coredev->mode = ver->FirmwareId == 255 ?
                                DEVICE_MODE_NONE : ver->FirmwareId;
                        coredev->modes_supported = ver->SupportedProtocols;
+                       coredev->fw_version = ver->RomVersionMajor << 8 |
+                                             ver->RomVersionMinor;
 
                        complete(&coredev->version_ex_done);
                        break;
index fc451e2064367291e5be2a301ebcad402726327d..f1440a55cb4d5ba66e7ce561916a3dd310f1dfbc 100644 (file)
@@ -178,6 +178,7 @@ struct smscore_device_t {
        /* Firmware */
        u8 *fw_buf;
        u32 fw_buf_size;
+       u16 fw_version;
 
        /* Infrared (IR) */
        struct ir_t ir;