diff options
author | Uri Shkolnik <uris@siano-ms.com> | 2009-05-17 11:01:03 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-17 00:14:34 +0200 |
commit | 01abc0b07685137765ec36441adf66f7cfcaf654 (patch) | |
tree | e71095f5996ba9aa0921624cc0086ca65a4bbc9b /drivers | |
parent | V4L/DVB (11819): Siano: smscore - fix get_common_buffer bug (diff) | |
download | linux-01abc0b07685137765ec36441adf66f7cfcaf654.tar.xz linux-01abc0b07685137765ec36441adf66f7cfcaf654.zip |
V4L/DVB (11820): Siano: smscore - fix byte ordering bug
Fix byte ordering bug.
Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 9a5358caec46..e80641afa52a 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -31,6 +31,7 @@ #include <linux/firmware.h> #include <linux/wait.h> +#include <asm/byteorder.h> #include "smscoreapi.h" #include "sms-cards.h" @@ -511,9 +512,13 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, { struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer; struct SmsMsgHdr_ST *msg; - u32 mem_address = firmware->StartAddress; + u32 mem_address; u8 *payload = firmware->Payload; int rc = 0; + firmware->StartAddress = le32_to_cpu(firmware->StartAddress); + firmware->Length = le32_to_cpu(firmware->Length); + + mem_address = firmware->StartAddress; sms_info("loading FW to addr 0x%x size %d", mem_address, firmware->Length); |