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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, October 13, 2008 - 3:20 pm

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=541dfa...
Commit:     541dfa87f9285b2ff7e703a5eab81ad821de7f6e
Parent:     d4e80beae1eef31df5749516ecb36f0fb366daf1
Author:     Antti Palosaari <crope@iki.fi>
AuthorDate: Mon Oct 6 13:57:45 2008 -0300
Committer:  Mauro Carvalho Chehab <mchehab@redhat.com>
CommitDate: Mon Oct 13 07:15:48 2008 -0200

    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: Antti Palosaari <crope@iki.fi>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---
 drivers/media/dvb/dvb-usb/af9015.c   |   12 ++++++------
 drivers/media/dvb/frontends/af9013.c |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c
index 8c183e5..67b1306 100644
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -661,7 +661,7 @@ static int af9015_download_firmware(struct usb_device *udev,
 			len = remainder;
 
 		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;
 		addr += FW_PACKET_MAX_DATA;
 
@@ -742,7 +742,7 @@ static int af9015_read_config(struct usb_device *udev)
 			}
 		} else {
 			switch (udev->descriptor.idVendor) {
-			case cpu_to_le16(USB_VID_LEADTEK):
+			case USB_VID_LEADTEK:
 				af9015_properties[i].rc_key_map =
 				  af9015_rc_keys_leadtek;
 				af9015_properties[i].rc_key_map_size =
@@ -752,9 +752,9 @@ static int af9015_read_config(struct usb_device *udev)
 				af9015_config.ir_table_size =
 				  ARRAY_SIZE(af9015_ir_table_leadtek);
 				break;
-			case cpu_to_le16(USB_VID_VISIONPLUS):
+			case USB_VID_VISIONPLUS:
 				if (udev->descriptor.idProduct ==
-				cpu_to_le16(USB_PID_AZUREWAVE_AD_TU700)) {
+				USB_PID_AZUREWAVE_AD_TU700) {
 					af9015_properties[i].rc_key_map =
 					  af9015_rc_keys_twinhan;
 					af9015_properties[i].rc_key_map_size =
@@ -765,7 +765,7 @@ static int af9015_read_config(struct usb_device *udev)
 					  ARRAY_SIZE(af9015_ir_table_twinhan);
 				}
 				break;
-			case cpu_to_le16(USB_VID_KWORLD_2):
+			case USB_VID_KWORLD_2:
 				/* TODO: use correct rc keys */
 				af9015_properties[i].rc_key_map =
 				  af9015_rc_keys_twinhan;
@@ -778,7 +778,7 @@ static int af9015_read_config(struct usb_device *udev)
 			/* Check USB manufacturer and product strings and try
 			   to determine correct remote in case of chip vendor
 			   reference IDs are used. */
-			case cpu_to_le16(USB_VID_AFATECH):
+			case USB_VID_AFATECH:
 				memset(manufacturer, 0, sizeof(manufacturer));
 				usb_string(udev, udev->descriptor.iManufacturer,
 					manufacturer, sizeof(manufacturer));
diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
index 0d2a0ad..21c1060 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -1490,7 +1490,7 @@ static int af9013_download_firmware(struct af9013_state *state)
 		if (i == packets)  /* set size of the last packet */
 			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);
 		addr += FW_PACKET_MAX_DATA;
 
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
V4L/DVB (9146): af901x: fix some compiler errors and warnings, Linux Kernel Mailing ..., (Mon Oct 13, 3:20 pm)