Skip to contentSkip to conversation

DVB: cxusb: fix firmware patch for big endian systems

PATCH New Michael Krufky 1 participant 1 message Mar 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 4/7 DVB: cxusb: fix firmware patch for big endian systems

From: Jin-Bong lee <[email protected]>
Date: Tue, 20 Feb 2007 23:10:34 -0300
Subject: [PATCH] DVB: cxusb: fix firmware patch for big endian systems

Without this patch, the device will not be detected after firmware download on big endian systems.

(cherry picked from commit 1d1370a48ca285ebe197ecd3197a8d5f161bc291)
---
 drivers/media/dvb/dvb-usb/cxusb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/dvb/dvb-usb/cxusb.c +2 -2
index 15d12fc..127a94b 100644
@@ -469,9 +469,9 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev,
 	    fw->data[BLUEBIRD_01_ID_OFFSET + 1] == USB_VID_DVICO >> 8) {
 
 		fw->data[BLUEBIRD_01_ID_OFFSET + 2] =
-			udev->descriptor.idProduct + 1;
+			le16_to_cpu(udev->descriptor.idProduct) + 1;
 		fw->data[BLUEBIRD_01_ID_OFFSET + 3] =
-			udev->descriptor.idProduct >> 8;
+			le16_to_cpu(udev->descriptor.idProduct) >> 8;
 
 		return usb_cypress_load_firmware(udev, fw, CYPRESS_FX2);
 	}