aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/usb-musb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/usb-musb.c')
-rw-r--r--arch/arm/mach-omap2/usb-musb.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index 19e4dac62a8c..47fb5d607630 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -60,14 +60,6 @@ static struct musb_hdrc_platform_data musb_plat = {
60 60
61static u64 musb_dmamask = DMA_BIT_MASK(32); 61static u64 musb_dmamask = DMA_BIT_MASK(32);
62 62
63static struct omap_device_pm_latency omap_musb_latency[] = {
64 {
65 .deactivate_func = omap_device_idle_hwmods,
66 .activate_func = omap_device_enable_hwmods,
67 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
68 },
69};
70
71static void usb_musb_mux_init(struct omap_musb_board_data *board_data) 63static void usb_musb_mux_init(struct omap_musb_board_data *board_data)
72{ 64{
73 switch (board_data->interface_type) { 65 switch (board_data->interface_type) {
@@ -115,7 +107,6 @@ static struct omap_musb_board_data musb_default_board_data = {
115void __init usb_musb_init(struct omap_musb_board_data *musb_board_data) 107void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
116{ 108{
117 struct omap_hwmod *oh; 109 struct omap_hwmod *oh;
118 struct omap_device *od;
119 struct platform_device *pdev; 110 struct platform_device *pdev;
120 struct device *dev; 111 struct device *dev;
121 int bus_id = -1; 112 int bus_id = -1;
@@ -145,22 +136,19 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
145 name = "musb-omap2430"; 136 name = "musb-omap2430";
146 } 137 }
147 138
148 oh = omap_hwmod_lookup(oh_name); 139 oh = omap_hwmod_lookup(oh_name);
149 if (!oh) { 140 if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
150 pr_err("Could not look up %s\n", oh_name); 141 __func__, oh_name))
151 return; 142 return;
152 }
153 143
154 od = omap_device_build(name, bus_id, oh, &musb_plat, 144 pdev = omap_device_build(name, bus_id, oh, &musb_plat,
155 sizeof(musb_plat), omap_musb_latency, 145 sizeof(musb_plat), NULL, 0, false);
156 ARRAY_SIZE(omap_musb_latency), false); 146 if (IS_ERR(pdev)) {
157 if (IS_ERR(od)) {
158 pr_err("Could not build omap_device for %s %s\n", 147 pr_err("Could not build omap_device for %s %s\n",
159 name, oh_name); 148 name, oh_name);
160 return; 149 return;
161 } 150 }
162 151
163 pdev = &od->pdev;
164 dev = &pdev->dev; 152 dev = &pdev->dev;
165 get_device(dev); 153 get_device(dev);
166 dev->dma_mask = &musb_dmamask; 154 dev->dma_mask = &musb_dmamask;