summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cx231xx/cx231xx-avcore.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-02-07 15:28:53 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-05 14:26:07 -0300
commit69a11a32643bda3e7f76af397cb6cd7b32c640f9 (patch)
tree96d8de1b309441da9ef5510cc6a174e2442223ab /drivers/media/usb/cx231xx/cx231xx-avcore.c
parentfff9e818fb523804084cf8456f48ffbc56b70fbe (diff)
[media] cx231xx: fix big-endian problems
Tested on my big-endian ppc-based test machine. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-avcore.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-avcore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-avcore.c b/drivers/media/usb/cx231xx/cx231xx-avcore.c
index 4706ed350293..3f26f64d7bf4 100644
--- a/drivers/media/usb/cx231xx/cx231xx-avcore.c
+++ b/drivers/media/usb/cx231xx/cx231xx-avcore.c
@@ -2221,7 +2221,7 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode)
if (status < 0)
return status;
- tmp = *((u32 *) value);
+ tmp = le32_to_cpu(*((u32 *) value));
switch (mode) {
case POLARIS_AVMODE_ENXTERNAL_AV:
@@ -2442,7 +2442,7 @@ int cx231xx_power_suspend(struct cx231xx *dev)
if (status > 0)
return status;
- tmp = *((u32 *) value);
+ tmp = le32_to_cpu(*((u32 *) value));
tmp &= (~PWR_MODE_MASK);
value[0] = (u8) tmp;
@@ -2470,7 +2470,7 @@ int cx231xx_start_stream(struct cx231xx *dev, u32 ep_mask)
if (status < 0)
return status;
- tmp = *((u32 *) value);
+ tmp = le32_to_cpu(*((u32 *) value));
tmp |= ep_mask;
value[0] = (u8) tmp;
value[1] = (u8) (tmp >> 8);
@@ -2495,7 +2495,7 @@ int cx231xx_stop_stream(struct cx231xx *dev, u32 ep_mask)
if (status < 0)
return status;
- tmp = *((u32 *) value);
+ tmp = le32_to_cpu(*((u32 *) value));
tmp &= (~ep_mask);
value[0] = (u8) tmp;
value[1] = (u8) (tmp >> 8);