提交 541dfa87 编写于 作者: A Antti Palosaari 提交者: Mauro Carvalho Chehab

V4L/DVB (9146): af901x: fix some compiler errors and warnings

- cast firmware data to u8
- remove cpu_to_le16 from switch-case label
Signed-off-by: NAntti Palosaari <crope@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 d4e80bea
...@@ -661,7 +661,7 @@ static int af9015_download_firmware(struct usb_device *udev, ...@@ -661,7 +661,7 @@ static int af9015_download_firmware(struct usb_device *udev,
len = remainder; len = remainder;
req.data_len = len; req.data_len = len;
req.data = (fw->data + i * FW_PACKET_MAX_DATA); req.data = (u8 *)(fw->data + i * FW_PACKET_MAX_DATA);
req.addr = addr; req.addr = addr;
addr += FW_PACKET_MAX_DATA; addr += FW_PACKET_MAX_DATA;
...@@ -742,7 +742,7 @@ static int af9015_read_config(struct usb_device *udev) ...@@ -742,7 +742,7 @@ static int af9015_read_config(struct usb_device *udev)
} }
} else { } else {
switch (udev->descriptor.idVendor) { switch (udev->descriptor.idVendor) {
case cpu_to_le16(USB_VID_LEADTEK): case USB_VID_LEADTEK:
af9015_properties[i].rc_key_map = af9015_properties[i].rc_key_map =
af9015_rc_keys_leadtek; af9015_rc_keys_leadtek;
af9015_properties[i].rc_key_map_size = af9015_properties[i].rc_key_map_size =
...@@ -752,9 +752,9 @@ static int af9015_read_config(struct usb_device *udev) ...@@ -752,9 +752,9 @@ static int af9015_read_config(struct usb_device *udev)
af9015_config.ir_table_size = af9015_config.ir_table_size =
ARRAY_SIZE(af9015_ir_table_leadtek); ARRAY_SIZE(af9015_ir_table_leadtek);
break; break;
case cpu_to_le16(USB_VID_VISIONPLUS): case USB_VID_VISIONPLUS:
if (udev->descriptor.idProduct == if (udev->descriptor.idProduct ==
cpu_to_le16(USB_PID_AZUREWAVE_AD_TU700)) { USB_PID_AZUREWAVE_AD_TU700) {
af9015_properties[i].rc_key_map = af9015_properties[i].rc_key_map =
af9015_rc_keys_twinhan; af9015_rc_keys_twinhan;
af9015_properties[i].rc_key_map_size = af9015_properties[i].rc_key_map_size =
...@@ -765,7 +765,7 @@ static int af9015_read_config(struct usb_device *udev) ...@@ -765,7 +765,7 @@ static int af9015_read_config(struct usb_device *udev)
ARRAY_SIZE(af9015_ir_table_twinhan); ARRAY_SIZE(af9015_ir_table_twinhan);
} }
break; break;
case cpu_to_le16(USB_VID_KWORLD_2): case USB_VID_KWORLD_2:
/* TODO: use correct rc keys */ /* TODO: use correct rc keys */
af9015_properties[i].rc_key_map = af9015_properties[i].rc_key_map =
af9015_rc_keys_twinhan; af9015_rc_keys_twinhan;
...@@ -778,7 +778,7 @@ static int af9015_read_config(struct usb_device *udev) ...@@ -778,7 +778,7 @@ static int af9015_read_config(struct usb_device *udev)
/* Check USB manufacturer and product strings and try /* Check USB manufacturer and product strings and try
to determine correct remote in case of chip vendor to determine correct remote in case of chip vendor
reference IDs are used. */ reference IDs are used. */
case cpu_to_le16(USB_VID_AFATECH): case USB_VID_AFATECH:
memset(manufacturer, 0, sizeof(manufacturer)); memset(manufacturer, 0, sizeof(manufacturer));
usb_string(udev, udev->descriptor.iManufacturer, usb_string(udev, udev->descriptor.iManufacturer,
manufacturer, sizeof(manufacturer)); manufacturer, sizeof(manufacturer));
......
...@@ -1490,7 +1490,7 @@ static int af9013_download_firmware(struct af9013_state *state) ...@@ -1490,7 +1490,7 @@ static int af9013_download_firmware(struct af9013_state *state)
if (i == packets) /* set size of the last packet */ if (i == packets) /* set size of the last packet */
len = remainder; len = remainder;
data = (fw->data + i * FW_PACKET_MAX_DATA); data = (u8 *)(fw->data + i * FW_PACKET_MAX_DATA);
ret = af9013_write_ofsm_regs(state, addr, data, len); ret = af9013_write_ofsm_regs(state, addr, data, len);
addr += FW_PACKET_MAX_DATA; addr += FW_PACKET_MAX_DATA;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册