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

The ohci-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 ohci_platform_reset() routine into ohci_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/ohci-platform.c