usb: host: ehci: do not use dev->priv
An ehci can be registered with ehci_register which is passed a struct
device_d *. In that case the priv pointer may already be used by the
caller, so we must not use it in the ehci code. At least for the Atmel
ehci driver this fixes a bug, here dev->priv is set two times to
different values.
Since we need dev->priv in the ehci code to get the controller in
ehci_detect() we can no longer implement that without the help of the
caller, hence we eport ehci_detect() and epect it to be called by
the code which registers a ehci host.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e3eb0c7 commit 610a2b2b696268f00d798e68db51a2cf90642648
@Sascha Hauer Sascha Hauer authored on 26 Oct 2018
Showing 4 changed files
View
drivers/usb/host/ehci-atmel.c
View
drivers/usb/host/ehci-hcd.c
View
drivers/usb/imx/chipidea-imx.c
View
include/usb/ehci.h