* [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp()
@ 2015-11-14 21:31 Cheah Kok Cheong
2015-11-15 13:54 ` Clemens Ladisch
0 siblings, 1 reply; 4+ messages in thread
From: Cheah Kok Cheong @ 2015-11-14 21:31 UTC (permalink / raw)
To: clemens; +Cc: tiwai, perex, alsa-devel, linux-kernel, Cheah Kok Cheong
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp()
2015-11-14 21:31 [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp() Cheah Kok Cheong
@ 2015-11-15 13:54 ` Clemens Ladisch
2015-11-16 8:04 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Clemens Ladisch @ 2015-11-15 13:54 UTC (permalink / raw)
To: tiwai; +Cc: Cheah Kok Cheong, alsa-devel, linux-kernel
Cheah Kok Cheong wrote:
> Commit 939f325f4a0f ("usb: add usb_endpoint_maxp() macro")
>
> And commit 29cc88979a88 ("USB: use usb_endpoint_maxp()
> instead of le16_to_cpu()")
These sentences no verb.
> Patched against
> git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
This does not belong into the commit message.
> Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
Otherwise:
Acked-by: Clemens Ladisch <clemens@ladisch.de>
> ---
> 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;
> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp()
2015-11-15 13:54 ` Clemens Ladisch
@ 2015-11-16 8:04 ` Takashi Iwai
2015-11-16 20:39 ` Cheah Kok Cheong
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2015-11-16 8:04 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel, Cheah Kok Cheong, linux-kernel
On Sun, 15 Nov 2015 14:54:28 +0100,
Clemens Ladisch wrote:
>
> Cheah Kok Cheong wrote:
> > Commit 939f325f4a0f ("usb: add usb_endpoint_maxp() macro")
> >
> > And commit 29cc88979a88 ("USB: use usb_endpoint_maxp()
> > instead of le16_to_cpu()")
>
> These sentences no verb.
>
> > Patched against
> > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
>
> This does not belong into the commit message.
>
> > Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
>
> Otherwise:
> Acked-by: Clemens Ladisch <clemens@ladisch.de>
Applied now with some manual fixes.
thanks,
Takashi
>
> > ---
> > 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;
> > }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp()
2015-11-16 8:04 ` Takashi Iwai
@ 2015-11-16 20:39 ` Cheah Kok Cheong
0 siblings, 0 replies; 4+ messages in thread
From: Cheah Kok Cheong @ 2015-11-16 20:39 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Clemens Ladisch, alsa-devel, linux-kernel
On Mon, Nov 16, 2015 at 09:04:02AM +0100, Takashi Iwai wrote:
> On Sun, 15 Nov 2015 14:54:28 +0100,
> Clemens Ladisch wrote:
> >
> > Cheah Kok Cheong wrote:
> > > Commit 939f325f4a0f ("usb: add usb_endpoint_maxp() macro")
> > >
> > > And commit 29cc88979a88 ("USB: use usb_endpoint_maxp()
> > > instead of le16_to_cpu()")
> >
> > These sentences no verb.
> >
> > > Patched against
> > > git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
> >
> > This does not belong into the commit message.
> >
> > > Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
> >
> > Otherwise:
> > Acked-by: Clemens Ladisch <clemens@ladisch.de>
>
> Applied now with some manual fixes.
>
>
> thanks,
>
> Takashi
>
Sorry for the commit message mistakes. Will keep in mind.
Thank you all.
Brgds,
CheahKC
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-16 20:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-14 21:31 [PATCH] Sound: Usb: Misc: ua101: replace le16_to_cpu() with usb_endpoint_maxp() Cheah Kok Cheong
2015-11-15 13:54 ` Clemens Ladisch
2015-11-16 8:04 ` Takashi Iwai
2015-11-16 20:39 ` Cheah Kok Cheong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).