linux-next: manual merge of the usb-gadget tree with the usb tree

2020-05-21 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the usb-gadget tree got a conflict in:

  drivers/usb/cdns3/gadget.c

between commit:

  e9010320f2d9 ("usb: cdns3: gadget: make a bunch of functions static")

from the usb tree and commit:

  e2e77a94078b ("usb: cdns3: mark local functions static")

from the usb-gadget tree.

I fixed it up (the difference was the indentation of contiuation lines -
I juts used the latter) and can carry the fix as necessary. This is now
fixed as far as linux-next is concerned, but any non trivial conflicts
should be mentioned to your upstream maintainer when your tree is
submitted for merging.  You may also want to consider cooperating with
the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpA72TQF3J1h.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2018-05-17 Thread Greg KH
On Thu, May 17, 2018 at 02:03:18PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the usb-gadget tree got a conflict in:
> 
>   drivers/usb/mtu3/Kconfig
> 
> between commit:
> 
>   cd91a0e9d38f ("usb: Remove depends on HAS_DMA in case of platform 
> dependency")
> 
> from the usb tree and commit:
> 
>   f39846824cd6 ("usb: mtu3: make USB_MTU3_DUAL_ROLE depend on EXTCON but not 
> USB_MTU3")
> 
> from the usb-gadget tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/usb/mtu3/Kconfig
> index c0c0eb88e5ea,8daf2776..
> --- a/drivers/usb/mtu3/Kconfig
> +++ b/drivers/usb/mtu3/Kconfig
> @@@ -2,7 -2,7 +2,7 @@@
>   
>   config USB_MTU3
>   tristate "MediaTek USB3 Dual Role controller"
> - depends on EXTCON && (USB || USB_GADGET)
>  -depends on (USB || USB_GADGET) && HAS_DMA
> ++depends on (USB || USB_GADGET)
>   depends on ARCH_MEDIATEK || COMPILE_TEST
>   select USB_XHCI_MTK if USB_SUPPORT && USB_XHCI_HCD
>   help

Looks good to me, thanks!

greg k-h


linux-next: manual merge of the usb-gadget tree with the usb tree

2018-05-16 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the usb-gadget tree got a conflict in:

  drivers/usb/mtu3/Kconfig

between commit:

  cd91a0e9d38f ("usb: Remove depends on HAS_DMA in case of platform dependency")

from the usb tree and commit:

  f39846824cd6 ("usb: mtu3: make USB_MTU3_DUAL_ROLE depend on EXTCON but not 
USB_MTU3")

from the usb-gadget tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/usb/mtu3/Kconfig
index c0c0eb88e5ea,8daf2776..
--- a/drivers/usb/mtu3/Kconfig
+++ b/drivers/usb/mtu3/Kconfig
@@@ -2,7 -2,7 +2,7 @@@
  
  config USB_MTU3
tristate "MediaTek USB3 Dual Role controller"
-   depends on EXTCON && (USB || USB_GADGET)
 -  depends on (USB || USB_GADGET) && HAS_DMA
++  depends on (USB || USB_GADGET)
depends on ARCH_MEDIATEK || COMPILE_TEST
select USB_XHCI_MTK if USB_SUPPORT && USB_XHCI_HCD
help


pgptVbhbRm97G.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2017-10-19 Thread Felipe Balbi

Hi,

Kees Cook  writes:
> On Wed, Oct 18, 2017 at 7:42 AM, Mark Brown  wrote:
>> Hi Felipe,
>>
>> Today's linux-next merge of the usb-gadget tree got a conflict in:
>>
>>   drivers/usb/gadget/udc/snps_udc_core.c
>>
>> between commit:
>>
>>   29bce57723351f63d ("usb/gadget/snps_udc_core: Convert timers to use 
>> timer_setup()")
>>
>> from the usb tree and commit:
>>
>>   46b614affda8667f9 ("usb: gadget: udc: snps_udc_core: use setup_timer() 
>> helper.")
>>
>> from the usb-gadget tree.
>>
>> I fixed it up by taking the USB version and can carry the fix as
>> necessary. This is now fixed as far as linux-next is concerned, but any
>> non trivial conflicts should be mentioned to your upstream maintainer
>> when your tree is submitted for merging.  You may also want to consider
>> cooperating with the maintainer of the conflicting tree to minimise any
>> particularly complex conflicts.
>
> FWIW, timer_setup() should be preferred over setup_timer().

I'll drop the one from my tree.

thanks

-- 
balbi


signature.asc
Description: PGP signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2017-10-18 Thread Mark Brown
On Wed, Oct 18, 2017 at 08:40:04AM -0700, Kees Cook wrote:
> On Wed, Oct 18, 2017 at 7:49 AM, Mark Brown  wrote:

> > I fixed it up with the USB version and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.

> FWIW, timer_setup() should be preferred over setup_timer().

Bah, that's unfortunate.  When more of these come up I'll do that.  It
would be better to sort these out in the relevant trees though, there's
quite a few of these conflicts and it's not super obvious if you're not
into the timer code what's preferred.


signature.asc
Description: PGP signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2017-10-18 Thread Kees Cook
On Wed, Oct 18, 2017 at 7:42 AM, Mark Brown  wrote:
> Hi Felipe,
>
> Today's linux-next merge of the usb-gadget tree got a conflict in:
>
>   drivers/usb/gadget/udc/snps_udc_core.c
>
> between commit:
>
>   29bce57723351f63d ("usb/gadget/snps_udc_core: Convert timers to use 
> timer_setup()")
>
> from the usb tree and commit:
>
>   46b614affda8667f9 ("usb: gadget: udc: snps_udc_core: use setup_timer() 
> helper.")
>
> from the usb-gadget tree.
>
> I fixed it up by taking the USB version and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.

FWIW, timer_setup() should be preferred over setup_timer().

-Kees

-- 
Kees Cook
Pixel Security


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2017-10-18 Thread Kees Cook
On Wed, Oct 18, 2017 at 7:49 AM, Mark Brown  wrote:
> Hi Felipe,
>
> Today's linux-next merge of the usb-gadget tree got a conflict in:
>
>   drivers/usb/phy/phy-isp1301-omap.c
>
> between commit:
>
>   4c13fec1ba55595 ("usb: isp1301-omap: Convert timers to use timer_setup()")
>
> from the usb tree and commit:
>
>   687f272c6b0e89d ("usb: phy: omap: use setup_timer() helper.")
>
> from the usb-gadget tree.
>
> I fixed it up with the USB version and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

FWIW, timer_setup() should be preferred over setup_timer().

-Kees

-- 
Kees Cook
Pixel Security


linux-next: manual merge of the usb-gadget tree with the usb tree

2017-10-18 Thread Mark Brown
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in:

  drivers/usb/phy/phy-isp1301-omap.c

between commit:

  4c13fec1ba55595 ("usb: isp1301-omap: Convert timers to use timer_setup()")

from the usb tree and commit:

  687f272c6b0e89d ("usb: phy: omap: use setup_timer() helper.")

from the usb-gadget tree.

I fixed it up with the USB version and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.


signature.asc
Description: PGP signature


linux-next: manual merge of the usb-gadget tree with the usb tree

2017-10-18 Thread Mark Brown
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in:

  drivers/usb/gadget/udc/snps_udc_core.c

between commit:

  29bce57723351f63d ("usb/gadget/snps_udc_core: Convert timers to use 
timer_setup()")

from the usb tree and commit:

  46b614affda8667f9 ("usb: gadget: udc: snps_udc_core: use setup_timer() 
helper.")

from the usb-gadget tree.

I fixed it up by taking the USB version and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.


signature.asc
Description: PGP signature


linux-next: manual merge of the usb-gadget tree with the usb tree

2017-04-06 Thread Stephen Rothwell
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in:

  drivers/usb/gadget/udc/amd5536udc.c

between commit:

  b5a6a4e5baef ("usb: gadget: amd5536udc: Replace PCI pool old API")

from the usb tree and commit:

  7bf80fcd797f ("usb: gadget: udc: avoid use of freed pointer")

from the usb-gadget tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/usb/gadget/udc/amd5536udc.c
index 270876b438ab,91d0f1a4dac1..
--- a/drivers/usb/gadget/udc/amd5536udc.c
+++ b/drivers/usb/gadget/udc/amd5536udc.c
@@@ -618,17 -579,12 +579,12 @@@ static void udc_free_dma_chain(struct u
DBG(dev, "free chain req = %p\n", req);
  
/* do not free first desc., will be done by free for request */
-   td_last = req->td_data;
-   td = phys_to_virt(td_last->next);
- 
for (i = 1; i < req->chain_len; i++) {
-   dma_pool_free(dev->data_requests, td,
- (dma_addr_t)td_last->next);
-   td_last = td;
-   td = phys_to_virt(td_last->next);
+   td = phys_to_virt(addr);
+   addr_next = (dma_addr_t)td->next;
 -  pci_pool_free(dev->data_requests, td, addr);
++  dma_pool_free(dev->data_requests, td, addr);
+   addr = addr_next;
}
- 
-   return ret_val;
  }
  
  /* Frees request packet, called by gadget driver */


linux-next: manual merge of the usb-gadget tree with the usb tree

2017-04-06 Thread Stephen Rothwell
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got conflicts in:

  drivers/usb/gadget/udc/Kconfig

between commit:

  2c93e790e825 ("usb: add CONFIG_USB_PCI for system have both PCI HW and 
non-PCI based USB HW")

from the usb tree and commit:

  5dbc49aebd0a ("usb: gadget: udc: amd5536: split core and PCI layer")

from the usb-gadget tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/usb/gadget/udc/Kconfig
index c6cc9d3270ac,707814da6000..
--- a/drivers/usb/gadget/udc/Kconfig
+++ b/drivers/usb/gadget/udc/Kconfig
@@@ -277,7 -292,8 +292,8 @@@ source "drivers/usb/gadget/udc/bdc/Kcon
  
  config USB_AMD5536UDC
tristate "AMD5536 UDC"
 -  depends on PCI
 +  depends on USB_PCI
+   select USB_SNP_CORE
help
   The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge.
   It is a USB Highspeed DMA capable USB device controller. Beside ep0


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2014-11-05 Thread Felipe Balbi
On Thu, Nov 06, 2014 at 02:58:32PM +1100, Stephen Rothwell wrote:
> Hi Felipe,
> 
> Today's linux-next merge of the usb-gadget tree got a conflict in
> drivers/usb/chipidea/otg_fsm.c between commit 51f1741fcc16 ("usb:
> chipidea: otg_fsm: delete unnecessary 'out of memory' messages") from
> the usb tree and commit ef44cb4226d1 ("usb: allow to supply the PHY in
> the drivers when using HCD") from the usb-gadget tree.
> 
> I fixed it up (the latter removed the code modified by the former) and
> can carry the fix as necessary (no action is required).

Alright, thanks for fixing it up.

-- 
balbi


signature.asc
Description: Digital signature


linux-next: manual merge of the usb-gadget tree with the usb tree

2014-11-05 Thread Stephen Rothwell
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in
drivers/usb/chipidea/otg_fsm.c between commit 51f1741fcc16 ("usb:
chipidea: otg_fsm: delete unnecessary 'out of memory' messages") from
the usb tree and commit ef44cb4226d1 ("usb: allow to supply the PHY in
the drivers when using HCD") from the usb-gadget tree.

I fixed it up (the latter removed the code modified by the former) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgphpt4WxPQhY.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2014-04-28 Thread Felipe Balbi
On Mon, Apr 28, 2014 at 03:20:44PM +1000, Stephen Rothwell wrote:
> Hi Felipe,
> 
> Today's linux-next merge of the usb-gadget tree got a conflict in
> drivers/usb/phy/phy-mv-u3d-usb.c between commit 543cab640279 ("usb: phy:
> mv_u3d: Remove usb phy driver for mv_u3d") from the usb tree and commit
> 041832565e40 ("usb: phy: mv-u3d: switch over to writel/readl") from the
> usb-gadget tree.
> 
> I fixed it up (the former removes the file, so I did that) and can carry
> the fix as necessary (no action is required).

I actually rejected that patch as you can see from the archives:

http://marc.info/?l=linux-usb&m=139758276329167&w=2

I said that it doesn't break anything and can even build in any
architecture if we switch over to writel/readl instead of _relaxed
versions which are only available on ARM (afaict).

Greg, looks like this commit went in your tree by mistake.

cheers

-- 
balbi


signature.asc
Description: Digital signature


linux-next: manual merge of the usb-gadget tree with the usb tree

2014-04-27 Thread Stephen Rothwell
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in
drivers/usb/phy/phy-mv-u3d-usb.c between commit 543cab640279 ("usb: phy:
mv_u3d: Remove usb phy driver for mv_u3d") from the usb tree and commit
041832565e40 ("usb: phy: mv-u3d: switch over to writel/readl") from the
usb-gadget tree.

I fixed it up (the former removes the file, so I did that) and can carry
the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpzi6j4N6KKP.pgp
Description: PGP signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2013-08-02 Thread Felipe Balbi
Hi,

On Fri, Aug 02, 2013 at 04:38:18PM +1000, Stephen Rothwell wrote:
> Today's linux-next merge of the usb-gadget tree got a conflict in
> drivers/usb/host/ehci-tegra.c between commit d4f09e28d7bc ("USB: host:
> use dev_get_platdata()") from the usb tree and commit d50642794508 ("usb:
> tegra: host: Remove references to plat data") from the usb-gadget tree.
> 
> I fixed it up (the latter just removed the code updated by the former, so
> I did that) and can carry the fix as necessary (no action is required).

Thank you

-- 
balbi


signature.asc
Description: Digital signature


linux-next: manual merge of the usb-gadget tree with the usb tree

2013-08-01 Thread Stephen Rothwell
Hi Felipe,

Today's linux-next merge of the usb-gadget tree got a conflict in
drivers/usb/host/ehci-tegra.c between commit d4f09e28d7bc ("USB: host:
use dev_get_platdata()") from the usb tree and commit d50642794508 ("usb:
tegra: host: Remove references to plat data") from the usb-gadget tree.

I fixed it up (the latter just removed the code updated by the former, so
I did that) and can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpgoSewNPEMk.pgp
Description: PGP signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2013-04-04 Thread Felipe Balbi
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 Rothwells...@canb.auug.org.au
> > 
> > diff --cc drivers/usb/host/ehci-tegra.c
> > index 4f3cfb8,1d2488c..000
> > --- 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


signature.asc
Description: Digital signature


Re: linux-next: manual merge of the usb-gadget tree with the usb tree

2013-04-03 Thread Thierry Reding
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 Rothwells...@canb.auug.org.au
> 
> diff --cc drivers/usb/host/ehci-tegra.c
> index 4f3cfb8,1d2488c..000
> --- 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


pgpdHnzwrZ8HN.pgp
Description: PGP signature


linux-next: manual merge of the usb-gadget tree with the usb tree

2013-04-03 Thread Stephen Rothwell
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 Rothwells...@canb.auug.org.au

diff --cc drivers/usb/host/ehci-tegra.c
index 4f3cfb8,1d2488c..000
--- 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);


pgpImdXbCaxGj.pgp
Description: PGP signature