Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69a11a32 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] cx231xx: fix big-endian problems



Tested on my big-endian ppc-based test machine.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent fff9e818
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -704,8 +704,8 @@ static int cx231xx_audio_init(struct cx231xx *dev)
					    audio_index + 1];

	adev->end_point_addr =
	    le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
			bEndpointAddress);
	    uif->altsetting[0].endpoint[isoc_pipe].desc.
			bEndpointAddress;

	adev->num_alt = uif->num_altsetting;
	cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+4 −4
Original line number Diff line number Diff line
@@ -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);
+8 −8
Original line number Diff line number Diff line
@@ -1189,8 +1189,8 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
	uif = udev->actconfig->interface[dev->current_pcb_config.
		       hs_config_info[0].interface_info.video_index + 1];

	dev->video_mode.end_point_addr = le16_to_cpu(uif->altsetting[0].
			endpoint[isoc_pipe].desc.bEndpointAddress);
	dev->video_mode.end_point_addr = uif->altsetting[0].
			endpoint[isoc_pipe].desc.bEndpointAddress;

	dev->video_mode.num_alt = uif->num_altsetting;
	cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
@@ -1223,8 +1223,8 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
				       vanc_index + 1];

	dev->vbi_mode.end_point_addr =
	    le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
			bEndpointAddress);
	    uif->altsetting[0].endpoint[isoc_pipe].desc.
			bEndpointAddress;

	dev->vbi_mode.num_alt = uif->num_altsetting;
	cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
@@ -1258,8 +1258,8 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
				       hanc_index + 1];

	dev->sliced_cc_mode.end_point_addr =
	    le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].desc.
			bEndpointAddress);
	    uif->altsetting[0].endpoint[isoc_pipe].desc.
			bEndpointAddress;

	dev->sliced_cc_mode.num_alt = uif->num_altsetting;
	cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
@@ -1294,8 +1294,8 @@ static int cx231xx_usb_probe(struct usb_interface *interface,
					       ts1_index + 1];

		dev->ts1_mode.end_point_addr =
		    le16_to_cpu(uif->altsetting[0].endpoint[isoc_pipe].
				desc.bEndpointAddress);
		    uif->altsetting[0].endpoint[isoc_pipe].
				desc.bEndpointAddress;

		dev->ts1_mode.num_alt = uif->num_altsetting;
		cx231xx_info("EndPoint Addr 0x%x, Alternate settings: %i\n",
+1 −1
Original line number Diff line number Diff line
@@ -1488,7 +1488,7 @@ int cx231xx_mode_register(struct cx231xx *dev, u16 address, u32 mode)
	if (status < 0)
		return status;

	tmp = *((u32 *) value);
	tmp = le32_to_cpu(*((u32 *) value));
	tmp |= mode;

	value[0] = (u8) tmp;
+1 −1
Original line number Diff line number Diff line
@@ -672,7 +672,7 @@ u32 initialize_cx231xx(struct cx231xx *dev)
	pcb config it is related to */
	cx231xx_read_ctrl_reg(dev, VRT_GET_REGISTER, BOARD_CFG_STAT, data, 4);

	config_info = *((u32 *) data);
	config_info = le32_to_cpu(*((u32 *) data));
	usb_speed = (u8) (config_info & 0x1);

	/* Verify this device belongs to Bus power or Self power device */