2013-04-04 04:18:57

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the usb-gadget tree with the usb tree

Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in
drivers/usb/host/ehci-tegra.c between commit 369a9a9d2af7 ("usb: host:
ehci-tegra: Fix oops in error cleanup") from the usb tree and commit
4261b8f3538c ("usb: host: ehci-tegra: fix PHY error handling") from the
usb-gadget tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

--
Cheers,
Stephen Rothwell [email protected]

diff --cc drivers/usb/host/ehci-tegra.c
index 4f3cfb8,1d2488c..0000000
--- a/drivers/usb/host/ehci-tegra.c
+++ b/drivers/usb/host/ehci-tegra.c
@@@ -770,19 -765,15 +770,17 @@@ static int tegra_ehci_probe(struct plat
if (!irq) {
dev_err(&pdev->dev, "Failed to get IRQ\n");
err = -ENODEV;
- goto fail;
+ goto fail_phy;
}

if (pdata->operating_mode == TEGRA_USB_OTG) {
tegra->transceiver =
devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
- if (!IS_ERR_OR_NULL(tegra->transceiver))
+ if (!IS_ERR(tegra->transceiver))
otg_set_host(tegra->transceiver->otg, &hcd->self);
+ } else {
+ tegra->transceiver = ERR_PTR(-ENODEV);
}
- #endif

err = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (err) {
@@@ -801,11 -792,8 +799,9 @@@
return err;

fail:
- #ifdef CONFIG_USB_OTG_UTILS
- if (!IS_ERR_OR_NULL(tegra->transceiver))
+ if (!IS_ERR(tegra->transceiver))
otg_set_host(tegra->transceiver->otg, NULL);
- #endif
+fail_phy:
usb_phy_shutdown(hcd->phy);
fail_io:
clk_disable_unprepare(tegra->clk);


Attachments:
(No filename) (1.49 kB)
(No filename) (836.00 B)
Download all attachments

2013-04-04 06:27:38

by Thierry Reding

[permalink] [raw]
Subject: Re: linux-next: manual merge of the usb-gadget tree with the usb tree

On Thu, Apr 04, 2013 at 03:18:45PM +1100, Stephen Rothwell wrote:
> Hi Felipe,
>
> Today's linux-next merge of the usb-gadget tree got a conflict in
> drivers/usb/host/ehci-tegra.c between commit 369a9a9d2af7 ("usb: host:
> ehci-tegra: Fix oops in error cleanup") from the usb tree and commit
> 4261b8f3538c ("usb: host: ehci-tegra: fix PHY error handling") from the
> usb-gadget tree.
>
> I fixed it up (I think - see below) and can carry the fix as necessary
> (no action is required).
>
> --
> Cheers,
> Stephen Rothwell [email protected]
>
> diff --cc drivers/usb/host/ehci-tegra.c
> index 4f3cfb8,1d2488c..0000000
> --- a/drivers/usb/host/ehci-tegra.c
> +++ b/drivers/usb/host/ehci-tegra.c
> @@@ -770,19 -765,15 +770,17 @@@ static int tegra_ehci_probe(struct plat
> if (!irq) {
> dev_err(&pdev->dev, "Failed to get IRQ\n");
> err = -ENODEV;
> - goto fail;
> + goto fail_phy;
> }
>
> if (pdata->operating_mode == TEGRA_USB_OTG) {
> tegra->transceiver =
> devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
> - if (!IS_ERR_OR_NULL(tegra->transceiver))
> + if (!IS_ERR(tegra->transceiver))
> otg_set_host(tegra->transceiver->otg, &hcd->self);
> + } else {
> + tegra->transceiver = ERR_PTR(-ENODEV);
> }
> - #endif
>
> err = usb_add_hcd(hcd, irq, IRQF_SHARED);
> if (err) {
> @@@ -801,11 -792,8 +799,9 @@@
> return err;
>
> fail:
> - #ifdef CONFIG_USB_OTG_UTILS
> - if (!IS_ERR_OR_NULL(tegra->transceiver))
> + if (!IS_ERR(tegra->transceiver))
> otg_set_host(tegra->transceiver->otg, NULL);
> - #endif
> +fail_phy:
> usb_phy_shutdown(hcd->phy);
> fail_io:
> clk_disable_unprepare(tegra->clk);

Looks good to me, thanks.

Thierry


Attachments:
(No filename) (1.69 kB)
(No filename) (836.00 B)
Download all attachments

2013-04-04 07:08:48

by Felipe Balbi

[permalink] [raw]
Subject: Re: linux-next: manual merge of the usb-gadget tree with the usb tree

On Thu, Apr 04, 2013 at 08:27:30AM +0200, Thierry Reding wrote:
> On Thu, Apr 04, 2013 at 03:18:45PM +1100, Stephen Rothwell wrote:
> > Hi Felipe,
> >
> > Today's linux-next merge of the usb-gadget tree got a conflict in
> > drivers/usb/host/ehci-tegra.c between commit 369a9a9d2af7 ("usb: host:
> > ehci-tegra: Fix oops in error cleanup") from the usb tree and commit
> > 4261b8f3538c ("usb: host: ehci-tegra: fix PHY error handling") from the
> > usb-gadget tree.
> >
> > I fixed it up (I think - see below) and can carry the fix as necessary
> > (no action is required).
> >
> > --
> > Cheers,
> > Stephen Rothwell [email protected]
> >
> > diff --cc drivers/usb/host/ehci-tegra.c
> > index 4f3cfb8,1d2488c..0000000
> > --- a/drivers/usb/host/ehci-tegra.c
> > +++ b/drivers/usb/host/ehci-tegra.c
> > @@@ -770,19 -765,15 +770,17 @@@ static int tegra_ehci_probe(struct plat
> > if (!irq) {
> > dev_err(&pdev->dev, "Failed to get IRQ\n");
> > err = -ENODEV;
> > - goto fail;
> > + goto fail_phy;
> > }
> >
> > if (pdata->operating_mode == TEGRA_USB_OTG) {
> > tegra->transceiver =
> > devm_usb_get_phy(&pdev->dev, USB_PHY_TYPE_USB2);
> > - if (!IS_ERR_OR_NULL(tegra->transceiver))
> > + if (!IS_ERR(tegra->transceiver))
> > otg_set_host(tegra->transceiver->otg, &hcd->self);
> > + } else {
> > + tegra->transceiver = ERR_PTR(-ENODEV);
> > }
> > - #endif
> >
> > err = usb_add_hcd(hcd, irq, IRQF_SHARED);
> > if (err) {
> > @@@ -801,11 -792,8 +799,9 @@@
> > return err;
> >
> > fail:
> > - #ifdef CONFIG_USB_OTG_UTILS
> > - if (!IS_ERR_OR_NULL(tegra->transceiver))
> > + if (!IS_ERR(tegra->transceiver))
> > otg_set_host(tegra->transceiver->otg, NULL);
> > - #endif
> > +fail_phy:
> > usb_phy_shutdown(hcd->phy);
> > fail_io:
> > clk_disable_unprepare(tegra->clk);
>
> Looks good to me, thanks.

looks correct indeed, thanks

--
balbi


Attachments:
(No filename) (1.90 kB)
signature.asc (836.00 B)
Digital signature
Download all attachments