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>
This commit is contained in:
Uri Shkolnik 2009-05-17 06:01:03 -03:00 коммит произвёл Mauro Carvalho Chehab
Родитель a9349315f6
Коммит 01abc0b076
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -31,6 +31,7 @@
#include <linux/firmware.h> #include <linux/firmware.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <asm/byteorder.h>
#include "smscoreapi.h" #include "smscoreapi.h"
#include "sms-cards.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 SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer;
struct SmsMsgHdr_ST *msg; struct SmsMsgHdr_ST *msg;
u32 mem_address = firmware->StartAddress; u32 mem_address;
u8 *payload = firmware->Payload; u8 *payload = firmware->Payload;
int rc = 0; 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", sms_info("loading FW to addr 0x%x size %d",
mem_address, firmware->Length); mem_address, firmware->Length);