Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1269539

[PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp()

From Cheah Kok Cheong <thrust73@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp()
Date 2015-11-14 22:40 +0100
Message-ID <quQIa-T6-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Commit 939f325f4a0f ("usb: add usb_endpoint_maxp() macro")

And commit 29cc88979a88 ("USB: use usb_endpoint_maxp()
instead of le16_to_cpu()")

This trivial patch convert remaining user.

Patched against
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git

Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
---
 sound/usb/misc/ua101.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
index 9581089..c19a5dd 100644
--- a/sound/usb/misc/ua101.c
+++ b/sound/usb/misc/ua101.c
@@ -1037,7 +1037,7 @@ static int detect_usb_format(struct ua101 *ua)
 		return -ENXIO;
 	}
 	ua->capture.usb_pipe = usb_rcvisocpipe(ua->dev, usb_endpoint_num(epd));
-	ua->capture.max_packet_bytes = le16_to_cpu(epd->wMaxPacketSize);
+	ua->capture.max_packet_bytes = usb_endpoint_maxp(epd);
 
 	epd = &ua->intf[INTF_PLAYBACK]->altsetting[1].endpoint[0].desc;
 	if (!usb_endpoint_is_isoc_out(epd)) {
@@ -1045,7 +1045,7 @@ static int detect_usb_format(struct ua101 *ua)
 		return -ENXIO;
 	}
 	ua->playback.usb_pipe = usb_sndisocpipe(ua->dev, usb_endpoint_num(epd));
-	ua->playback.max_packet_bytes = le16_to_cpu(epd->wMaxPacketSize);
+	ua->playback.max_packet_bytes = usb_endpoint_maxp(epd);
 	return 0;
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp() Cheah Kok Cheong <thrust73@gmail.com> - 2015-11-14 22:40 +0100
  Re: [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with  usb_endpoint_maxp() Clemens Ladisch <clemens@ladisch.de> - 2015-11-15 15:00 +0100
    Re: [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp() Takashi Iwai <tiwai@suse.de> - 2015-11-16 09:10 +0100
      Re: [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with  usb_endpoint_maxp() Cheah Kok Cheong <thrust73@gmail.com> - 2015-11-16 21:40 +0100

csiph-web