From 7333839505d568e0e69a6d02a3ee0f455b6c37a5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 9 Mar 2013 09:56:27 -0300 Subject: [PATCH] [media] siano: store firmware version 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 --- drivers/media/common/siano/smscoreapi.c | 2 ++ drivers/media/common/siano/smscoreapi.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index 1dab4b64d395..7b5d81a30cdf 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c @@ -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; diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h index fc451e206436..f1440a55cb4d 100644 --- a/drivers/media/common/siano/smscoreapi.h +++ b/drivers/media/common/siano/smscoreapi.h @@ -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;