USB: ehci-platform: check for platform data misconfiguration
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 11 Feb 2014 16:26:10 +0000 (11:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 21:39:54 +0000 (13:39 -0800)
commit843d5e036419bddb4aaf21d60c7ffe437e963166
tree86fed1c16a6367177f9d96f90ed194429476ea3e
parent915974c34ee056be918b7ea287a870766a0db6ba
USB: ehci-platform: check for platform data misconfiguration

The ehci-platform driver checks for misconfigurations in cases where
the Device Tree data specifies big-endian registers or descriptors but
the corresponding driver config settings have not been enabled.  As
Jonas Gorski suggested, we may as well apply the same check to general
platform data too.

This requires moving the code that sets the big-endian quirk flags
from the ehci_platform_reset() routine into ehci_platform_probe(), and
moving the checks out of the DT-specific "if" statement clause.

The patch also changes the text of the error messages in an attempt to
make the nature of the error more clear.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Jonas Gorski <jogo@openwrt.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-platform.c