diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-02-07 19:28:53 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-05 18:26:07 +0100 |
commit | 69a11a32643bda3e7f76af397cb6cd7b32c640f9 (patch) | |
tree | 96d8de1b309441da9ef5510cc6a174e2442223ab /drivers/media/usb/cx231xx/cx231xx-avcore.c | |
parent | [media] cx231xx: don't use port 3 on the Conexant video grabber (diff) | |
download | linux-69a11a32643bda3e7f76af397cb6cd7b32c640f9.tar.xz linux-69a11a32643bda3e7f76af397cb6cd7b32c640f9.zip |
[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.c | 8 |
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); |