Hello

Are double le16_to_cpu casts required?
or can these be safely removed?

Neekhil

--~--~---------~--~----~------------~-------~--~----~
Lets make microdia webcams plug'n play, (currently plug'n pray)
To post to this group, send email to [email protected]
Visit us online https://groups.google.com/group/microdia
-~----------~----~----~----~------~----~------~--~---

From 5860afc8782bafbda8ec3b236920b5d25cc68628 Mon Sep 17 00:00:00 2001
From: neekhil <[email protected]>
Date: Wed, 17 Dec 2008 19:51:04 +0030
Subject: [PATCH] Are double le16_to_cpu casts required?

Are double le16_to_cpu casts required?
or can these be safely removed?

Signed-off-by: neekhil <[email protected]>
---
 microdia-usb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/microdia-usb.c b/microdia-usb.c
index e9b405b..c6a7339 100644
--- a/microdia-usb.c
+++ b/microdia-usb.c
@@ -273,8 +273,8 @@ int usb_microdia_isoc_init(struct usb_microdia *dev,
 	UDIA_DEBUG("usb_microdia_isoc_init()\n");
 
 	iso_max_frame_size =
-		max_packet_sz(le16_to_cpu(le16_to_cpu(ep->wMaxPacketSize))) *
-		hb_multiplier(le16_to_cpu(le16_to_cpu(ep->wMaxPacketSize)));
+		max_packet_sz(le16_to_cpu(ep->wMaxPacketSize)) *
+		hb_multiplier(le16_to_cpu(ep->wMaxPacketSize));
 
 	for (i = 0; i < MAX_URBS; i++) {
 		urb = usb_alloc_urb(ISO_FRAMES_PER_DESC, GFP_KERNEL);
@@ -321,7 +321,7 @@ int usb_microdia_bulk_init(struct usb_microdia *dev,
 	unsigned int pipe, i;
 	__u16 psize;
 	__u32 size;
-	psize = max_packet_sz(le16_to_cpu(le16_to_cpu(ep->wMaxPacketSize)));
+	psize = max_packet_sz(le16_to_cpu(ep->wMaxPacketSize));
 	size = psize * ISO_FRAMES_PER_DESC;
 	pipe = usb_rcvbulkpipe(dev->udev, ep->bEndpointAddress);
 
-- 
1.5.6.3

Reply via email to