Sansa AMSv2 USB: Simplify union around struct usb_ctrlrequest and remove duplicate alignment attribute

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31065 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2011-11-27 00:22:12 +00:00
parent a89c705ecb
commit 99ea0c5051

View file

@ -95,13 +95,10 @@ static struct usb_endpoint endpoints[USB_NUM_ENDPOINTS][2];
e.g. write descriptor requests (which are rejected by us, but the e.g. write descriptor requests (which are rejected by us, but the
payload is transferred anyway) do not cause memory corruption. payload is transferred anyway) do not cause memory corruption.
Fixes FS#12310. -- Michael Sparmann (theseven) */ Fixes FS#12310. -- Michael Sparmann (theseven) */
static struct static union {
{
union {
struct usb_ctrlrequest header; /* 8 bytes */ struct usb_ctrlrequest header; /* 8 bytes */
unsigned char payload[64]; unsigned char payload[64];
}; } _ep0_setup_pkt USB_DEVBSS_ATTR;
} _ep0_setup_pkt USB_DEVBSS_ATTR __attribute__((aligned(32)));
static struct usb_ctrlrequest *ep0_setup_pkt = AS3525_UNCACHED_ADDR(&_ep0_setup_pkt.header); static struct usb_ctrlrequest *ep0_setup_pkt = AS3525_UNCACHED_ADDR(&_ep0_setup_pkt.header);