.. | .. |
---|
42 | 42 | }; |
---|
43 | 43 | |
---|
44 | 44 | struct tegra_ehci_hcd { |
---|
45 | | - struct tegra_usb_phy *phy; |
---|
46 | 45 | struct clk *clk; |
---|
47 | 46 | struct reset_control *rst; |
---|
48 | 47 | int port_resuming; |
---|
49 | 48 | bool needs_double_reset; |
---|
50 | | - enum tegra_usb_phy_port_speed port_speed; |
---|
51 | 49 | }; |
---|
52 | 50 | |
---|
53 | 51 | static int tegra_reset_usb_controller(struct platform_device *pdev) |
---|
.. | .. |
---|
284 | 282 | struct dma_aligned_buffer { |
---|
285 | 283 | void *kmalloc_ptr; |
---|
286 | 284 | void *old_xfer_buffer; |
---|
287 | | - u8 data[0]; |
---|
| 285 | + u8 data[]; |
---|
288 | 286 | }; |
---|
289 | 287 | |
---|
290 | 288 | static void free_dma_aligned_buffer(struct urb *urb) |
---|
.. | .. |
---|
480 | 478 | } |
---|
481 | 479 | u_phy->otg->host = hcd_to_bus(hcd); |
---|
482 | 480 | |
---|
483 | | - err = usb_phy_set_suspend(hcd->usb_phy, 0); |
---|
484 | | - if (err) { |
---|
485 | | - dev_err(&pdev->dev, "Failed to power on the phy\n"); |
---|
486 | | - goto cleanup_phy; |
---|
487 | | - } |
---|
488 | | - |
---|
489 | 481 | irq = platform_get_irq(pdev, 0); |
---|
490 | | - if (!irq) { |
---|
491 | | - dev_err(&pdev->dev, "Failed to get IRQ\n"); |
---|
492 | | - err = -ENODEV; |
---|
| 482 | + if (irq < 0) { |
---|
| 483 | + err = irq; |
---|
493 | 484 | goto cleanup_phy; |
---|
494 | 485 | } |
---|
495 | 486 | |
---|
.. | .. |
---|
521 | 512 | struct tegra_ehci_hcd *tegra = |
---|
522 | 513 | (struct tegra_ehci_hcd *)hcd_to_ehci(hcd)->priv; |
---|
523 | 514 | |
---|
524 | | - otg_set_host(hcd->usb_phy->otg, NULL); |
---|
525 | | - |
---|
526 | | - usb_phy_shutdown(hcd->usb_phy); |
---|
527 | 515 | usb_remove_hcd(hcd); |
---|
528 | | - |
---|
529 | | - reset_control_assert(tegra->rst); |
---|
530 | | - udelay(1); |
---|
531 | | - |
---|
| 516 | + otg_set_host(hcd->usb_phy->otg, NULL); |
---|
| 517 | + usb_phy_shutdown(hcd->usb_phy); |
---|
532 | 518 | clk_disable_unprepare(tegra->clk); |
---|
533 | | - |
---|
534 | 519 | usb_put_hcd(hcd); |
---|
535 | 520 | |
---|
536 | 521 | return 0; |
---|