usb: phy: tegra: don't call into tegra-ehci directly
authorArnd Bergmann <arnd@arndb.de>
Tue, 23 Apr 2013 19:05:40 +0000 (21:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Apr 2013 19:50:38 +0000 (12:50 -0700)
commitee5d5499edb94cd03738a52a7e234b139da8fd72
tree6c6fe301f894625e86afb19ed283d3e2af39c77d
parent4623245c769662e7cad80e1f9b39dadfbc2ad06d
usb: phy: tegra: don't call into tegra-ehci directly

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
which does not work if one of them or both are loadable modules, resulting
in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci
driver pass two function pointers for callbacks that need to be called by
the phy driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Venu Byravarasu <vbyravarasu@nvidia.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-tegra.c
drivers/usb/phy/phy-tegra-usb.c
include/linux/usb/tegra_usb_phy.h