~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to drivers/usb/host/ehci-omap.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
        }
99
99
}
100
100
 
 
101
static void disable_put_regulator(
 
102
                struct ehci_hcd_omap_platform_data *pdata)
 
103
{
 
104
        int i;
 
105
 
 
106
        for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
 
107
                if (pdata->regulator[i]) {
 
108
                        regulator_disable(pdata->regulator[i]);
 
109
                        regulator_put(pdata->regulator[i]);
 
110
                }
 
111
        }
 
112
}
101
113
 
102
114
/* configure so an HC device and id are always provided */
103
115
/* always called with process context; sleeping is OK */
216
228
        /* cache this readonly data; minimize chip reads */
217
229
        omap_ehci->hcs_params = readl(&omap_ehci->caps->hcs_params);
218
230
 
219
 
        ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
 
231
        ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
220
232
        if (ret) {
221
233
                dev_err(dev, "failed to add hcd with err %d\n", ret);
222
234
                goto err_add_hcd;
231
243
        omap_usbhs_disable(dev);
232
244
 
233
245
err_enable:
 
246
        disable_put_regulator(pdata);
234
247
        usb_put_hcd(hcd);
235
248
 
236
249
err_io:
 
250
        iounmap(regs);
237
251
        return ret;
238
252
}
239
253
 
253
267
 
254
268
        usb_remove_hcd(hcd);
255
269
        omap_usbhs_disable(dev);
 
270
        disable_put_regulator(dev->platform_data);
 
271
        iounmap(hcd->regs);
256
272
        usb_put_hcd(hcd);
257
273
        return 0;
258
274
}