arm: tegra: enterprise: Filling regulator supply info
[linux-2.6.git] / drivers / mfd / omap-usb-host.c
index 55c5d47..86e1458 100644 (file)
@@ -17,6 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
@@ -281,6 +282,7 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
 
        if (!ehci) {
                dev_err(dev, "omap_usbhs_alloc_child failed\n");
+               ret = -ENOMEM;
                goto err_end;
        }
 
@@ -304,13 +306,14 @@ static int omap_usbhs_alloc_children(struct platform_device *pdev)
                sizeof(*ohci_data), dev);
        if (!ohci) {
                dev_err(dev, "omap_usbhs_alloc_child failed\n");
+               ret = -ENOMEM;
                goto err_ehci;
        }
 
        return 0;
 
 err_ehci:
-       platform_device_put(ehci);
+       platform_device_unregister(ehci);
 
 err_end:
        return ret;
@@ -674,7 +677,6 @@ static void usbhs_omap_tll_init(struct device *dev, u8 tll_channel_count)
                                | OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
                                | OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
 
-                       reg |= (1 << (i + 1));
                } else
                        continue;
 
@@ -996,9 +998,9 @@ static void usbhs_disable(struct device *dev)
 
        if (is_omap_usbhs_rev2(omap)) {
                if (is_ehci_tll_mode(pdata->port_mode[0]))
-                       clk_enable(omap->usbtll_p1_fck);
+                       clk_disable(omap->usbtll_p1_fck);
                if (is_ehci_tll_mode(pdata->port_mode[1]))
-                       clk_enable(omap->usbtll_p2_fck);
+                       clk_disable(omap->usbtll_p2_fck);
                clk_disable(omap->utmi_p2_fck);
                clk_disable(omap->utmi_p1_fck);
        }