From 99ea0c5051d51b8cd72e009b96442942f1766792 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 27 Nov 2011 00:22:12 +0000 Subject: [PATCH] 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 --- firmware/target/arm/as3525/usb-drv-as3525v2.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/firmware/target/arm/as3525/usb-drv-as3525v2.c b/firmware/target/arm/as3525/usb-drv-as3525v2.c index 3d4f1579c5..9954484f01 100644 --- a/firmware/target/arm/as3525/usb-drv-as3525v2.c +++ b/firmware/target/arm/as3525/usb-drv-as3525v2.c @@ -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 payload is transferred anyway) do not cause memory corruption. Fixes FS#12310. -- Michael Sparmann (theseven) */ -static struct -{ - union { - struct usb_ctrlrequest header; /* 8 bytes */ - unsigned char payload[64]; - }; -} _ep0_setup_pkt USB_DEVBSS_ATTR __attribute__((aligned(32))); +static union { + struct usb_ctrlrequest header; /* 8 bytes */ + unsigned char payload[64]; +} _ep0_setup_pkt USB_DEVBSS_ATTR; static struct usb_ctrlrequest *ep0_setup_pkt = AS3525_UNCACHED_ADDR(&_ep0_setup_pkt.header);