diff mbox

[0905_25] Siano: smscore - fix byte ordering bug

Message ID 108583.81032.qm@web110804.mail.gq1.yahoo.com (mailing list archive)
State Accepted
Headers show

Commit Message

Uri Shkolnik May 17, 2009, 9:01 a.m. UTC
# HG changeset patch
# User Uri Shkolnik <uris@siano-ms.com>
# Date 1242332055 -10800
# Node ID d826829f17df5ccb89fab3a0d48b8aadd04f9689
# Parent  fc839f80e81fed027a4721f5c679b9af7e27c867
[0905_25] Siano: smscore - fix byte ordering bug

From: Uri Shkolnik <uris@siano-ms.com>

Fix byte ordering bug.

Priority: normal

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>




      
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff -r fc839f80e81f -r d826829f17df linux/drivers/media/dvb/siano/smscoreapi.c
--- a/linux/drivers/media/dvb/siano/smscoreapi.c	Thu May 14 23:11:07 2009 +0300
+++ b/linux/drivers/media/dvb/siano/smscoreapi.c	Thu May 14 23:14:15 2009 +0300
@@ -31,6 +31,7 @@ 
 
 #include <linux/firmware.h>
 #include <linux/wait.h>
+#include <asm/byteorder.h>
 
 #include "smscoreapi.h"
 #include "smsendian.h"
@@ -516,9 +517,13 @@  static int smscore_load_firmware_family2
 {
 	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);