aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2004-12-20 01:15:36 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2004-12-20 01:15:36 -0800
commit552c4455c79db5117174280fc377ce8cccaf6ba4 (patch)
tree484def6b9103468ba2610b40f9d272e9bd4b6514 /sound
parent46624aa39077c1d8a7d05550e81c4f0674ead48e (diff)
downloadhistory-552c4455c79db5117174280fc377ce8cccaf6ba4.tar.gz
USB: change wMaxPacketSize field in struct usb_config_descriptor to be __le16
Yet another step in the quest to get all USB data structures to be native endian. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/usbaudio.c8
-rw-r--r--sound/usb/usx2y/usbusx2yaudio.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index 087342ccbd2210..ac1a5889752aab 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -2450,7 +2450,7 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
(altsd->bInterfaceSubClass != USB_SUBCLASS_AUDIO_STREAMING &&
altsd->bInterfaceSubClass != USB_SUBCLASS_VENDOR_SPEC) ||
altsd->bNumEndpoints < 1 ||
- get_endpoint(alts, 0)->wMaxPacketSize == 0)
+ le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize) == 0)
continue;
/* must be isochronous */
if ((get_endpoint(alts, 0)->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
@@ -2513,7 +2513,7 @@ static int parse_audio_endpoints(snd_usb_audio_t *chip, int iface_no)
fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
/* FIXME: decode wMaxPacketSize of high bandwith endpoints */
- fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+ fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
fp->attributes = csep[3];
/* some quirks for attributes here */
@@ -2809,7 +2809,7 @@ static int create_ua700_ua25_quirk(snd_usb_audio_t *chip,
fp->iface = altsd->bInterfaceNumber;
fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
- fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+ fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
switch (fp->maxpacksize) {
case 0x120:
@@ -2875,7 +2875,7 @@ static int create_ua1000_quirk(snd_usb_audio_t *chip, struct usb_interface *ifac
fp->iface = altsd->bInterfaceNumber;
fp->endpoint = get_endpoint(alts, 0)->bEndpointAddress;
fp->ep_attr = get_endpoint(alts, 0)->bmAttributes;
- fp->maxpacksize = get_endpoint(alts, 0)->wMaxPacketSize;
+ fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize);
fp->rate_max = fp->rate_min = combine_triple(&alts->extra[8]);
stream = (fp->endpoint & USB_DIR_IN)
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
index 85d6c527341792..bae3e1bff4b3c3 100644
--- a/sound/usb/usx2y/usbusx2yaudio.c
+++ b/sound/usb/usx2y/usbusx2yaudio.c
@@ -458,7 +458,7 @@ static int usX2Y_urbs_allocate(snd_usX2Y_substream_t *subs)
ep = dev->ep_out[subs->endpoint];
if (!ep)
return -EINVAL;
- subs->maxpacksize = ep->desc.wMaxPacketSize;
+ subs->maxpacksize = le16_to_cpu(ep->desc.wMaxPacketSize);
if (NULL == subs->tmpbuf) {
subs->tmpbuf = kcalloc(NRPACKS, subs->maxpacksize, GFP_KERNEL);
if (NULL == subs->tmpbuf) {
@@ -471,7 +471,7 @@ static int usX2Y_urbs_allocate(snd_usX2Y_substream_t *subs)
ep = dev->ep_in[subs->endpoint];
if (!ep)
return -EINVAL;
- subs->maxpacksize = ep->desc.wMaxPacketSize;
+ subs->maxpacksize = le16_to_cpu(ep->desc.wMaxPacketSize);
}
/* allocate and initialize data urbs */