Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1555033 > unrolled thread

Re: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon API when registering extcon notifier

Started byChanwoo Choi <cw00.choi@samsung.com>
First post2017-01-10 09:30 +0100
Last post2017-01-10 21:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon API  when registering extcon notifier Chanwoo Choi <cw00.choi@samsung.com> - 2017-01-10 09:30 +0100
    Re: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon  API when registering extcon notifier Bin Liu <b-liu@ti.com> - 2017-01-10 21:50 +0100

#1555033 — Re: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon API when registering extcon notifier

FromChanwoo Choi <cw00.choi@samsung.com>
Date2017-01-10 09:30 +0100
SubjectRe: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon API when registering extcon notifier
Message-ID<sXZYC-7oH-23@gated-at.bofh.it>
Hi Felipe,

This patch got the acked-by from Bin Liu and.
Could you please apply this patch?

On 2016년 12월 30일 13:19, Chanwoo Choi wrote:
> This patch just uses the resource-managed extcon API when registering
> the extcon notifier.
> 
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> Acked-by: Bin Liu <b-liu@ti.com>
> ---
> Changes from v1:
> - Rebase this patch based on v4.10-rc1.
> - Add acked-by tag from Maxime Ripard and Bin Lin.
> - Drop the phy/power-supply/chipidea patches.
> 
>  drivers/usb/musb/sunxi.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
> index d0be0eadd0d9..2332294dee0f 100644
> --- a/drivers/usb/musb/sunxi.c
> +++ b/drivers/usb/musb/sunxi.c
> @@ -251,14 +251,14 @@ static int sunxi_musb_init(struct musb *musb)
>  	writeb(SUNXI_MUSB_VEND0_PIO_MODE, musb->mregs + SUNXI_MUSB_VEND0);
>  
>  	/* Register notifier before calling phy_init() */
> -	ret = extcon_register_notifier(glue->extcon, EXTCON_USB_HOST,
> -				       &glue->host_nb);
> +	ret = devm_extcon_register_notifier(glue->dev, glue->extcon,
> +					EXTCON_USB_HOST, &glue->host_nb);
>  	if (ret)
>  		goto error_reset_assert;
>  
>  	ret = phy_init(glue->phy);
>  	if (ret)
> -		goto error_unregister_notifier;
> +		goto error_reset_assert;
>  
>  	musb->isr = sunxi_musb_interrupt;
>  
> @@ -267,9 +267,6 @@ static int sunxi_musb_init(struct musb *musb)
>  
>  	return 0;
>  
> -error_unregister_notifier:
> -	extcon_unregister_notifier(glue->extcon, EXTCON_USB_HOST,
> -				   &glue->host_nb);
>  error_reset_assert:
>  	if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags))
>  		reset_control_assert(glue->rst);
> @@ -293,9 +290,6 @@ static int sunxi_musb_exit(struct musb *musb)
>  
>  	phy_exit(glue->phy);
>  
> -	extcon_unregister_notifier(glue->extcon, EXTCON_USB_HOST,
> -				   &glue->host_nb);
> -
>  	if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags))
>  		reset_control_assert(glue->rst);
>  
> 


-- 
Best Regards,
Chanwoo Choi
S/W Center, Samsung Electronics

[toc] | [next] | [standalone]


#1555909 — Re: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon API when registering extcon notifier

FromBin Liu <b-liu@ti.com>
Date2017-01-10 21:50 +0100
SubjectRe: [PATCH v2] usb: musb: sunxi: Uses the resource-managed extcon API when registering extcon notifier
Message-ID<sYbwK-5Yo-11@gated-at.bofh.it>
In reply to#1555033
On Tue, Jan 10, 2017 at 05:20:38PM +0900, Chanwoo Choi wrote:
> Hi Felipe,
> 
> This patch got the acked-by from Bin Liu and.
> Could you please apply this patch?

I have picked this one.

Regards,
-Bin.

> 
> On 2016년 12월 30일 13:19, Chanwoo Choi wrote:
> > This patch just uses the resource-managed extcon API when registering
> > the extcon notifier.
> > 
> > Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> > Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > Acked-by: Bin Liu <b-liu@ti.com>
> > ---
> > Changes from v1:
> > - Rebase this patch based on v4.10-rc1.
> > - Add acked-by tag from Maxime Ripard and Bin Lin.
> > - Drop the phy/power-supply/chipidea patches.
> > 
> >  drivers/usb/musb/sunxi.c | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
> > index d0be0eadd0d9..2332294dee0f 100644
> > --- a/drivers/usb/musb/sunxi.c
> > +++ b/drivers/usb/musb/sunxi.c
> > @@ -251,14 +251,14 @@ static int sunxi_musb_init(struct musb *musb)
> >  	writeb(SUNXI_MUSB_VEND0_PIO_MODE, musb->mregs + SUNXI_MUSB_VEND0);
> >  
> >  	/* Register notifier before calling phy_init() */
> > -	ret = extcon_register_notifier(glue->extcon, EXTCON_USB_HOST,
> > -				       &glue->host_nb);
> > +	ret = devm_extcon_register_notifier(glue->dev, glue->extcon,
> > +					EXTCON_USB_HOST, &glue->host_nb);
> >  	if (ret)
> >  		goto error_reset_assert;
> >  
> >  	ret = phy_init(glue->phy);
> >  	if (ret)
> > -		goto error_unregister_notifier;
> > +		goto error_reset_assert;
> >  
> >  	musb->isr = sunxi_musb_interrupt;
> >  
> > @@ -267,9 +267,6 @@ static int sunxi_musb_init(struct musb *musb)
> >  
> >  	return 0;
> >  
> > -error_unregister_notifier:
> > -	extcon_unregister_notifier(glue->extcon, EXTCON_USB_HOST,
> > -				   &glue->host_nb);
> >  error_reset_assert:
> >  	if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags))
> >  		reset_control_assert(glue->rst);
> > @@ -293,9 +290,6 @@ static int sunxi_musb_exit(struct musb *musb)
> >  
> >  	phy_exit(glue->phy);
> >  
> > -	extcon_unregister_notifier(glue->extcon, EXTCON_USB_HOST,
> > -				   &glue->host_nb);
> > -
> >  	if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags))
> >  		reset_control_assert(glue->rst);
> >  
> > 
> 
> 
> -- 
> Best Regards,
> Chanwoo Choi
> S/W Center, Samsung Electronics

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web