V4L/DVB (5276): Cxusb: fix firmware patch for big endian systems
authorJin-Bong lee <jinbong.lee@samsung.com>
Wed, 21 Feb 2007 02:10:34 +0000 (23:10 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 1 Mar 2007 15:09:45 +0000 (13:09 -0200)
Without this patch, the device will not be detected after firmware download
on big endian systems.

Signed-off-by: Jin-Bong lee <jinbong.lee@samsung.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-usb/cxusb.c

index 15d12fce34df871e8ffaed1b4c39b7566fa97d82..127a94b9a1b537c9b0a810eaf0ad92d19f8d71db 100644 (file)
@@ -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);
        }