Skip to content
Commit d0176f61 authored by Justin Waters's avatar Justin Waters Committed by Russell King
Browse files

[ARM] 5445/1: AT91: Remove flexible array from USBH platform data



The flexible array in the USBH platform data is not safe to copy.  The
compiler will not allocate any extra memory for the non-init platform
data structure (in the *_devices.c files) since it isn't given any
defaults at compile time.  When the probe function attempts to address
that array, it will actually attempt to access data in an adjacent
structure.

Since there are currently no (known) implementations of the at91 USBH
IP with more than 2 vbus pins, I am capping the value at 2.  If somebody
tries to assign more, then the compiler will produce a warning.

Signed-off-by: default avatarJustin Waters <justin.waters@timesys.com>
Acked-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Acked-by: default avatarAndrew Victor <linux@maxim.org.za>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 8bd239d2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment