linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: 8250_dw: Check the data->pclk when get apb_pclk
@ 2016-08-24  8:33 Kefeng Wang
  2016-08-25 12:55 ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Kefeng Wang @ 2016-08-24  8:33 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Chen-Yu Tsai, Jiri Slaby, Andy Shevchenko, Heikki Krogerus,
	guohanjun, linux-serial, linux-kernel, Kefeng Wang

It should check the data->pclk, not data->clk when get apb_pclk.

Fixes: c8ed99d4f6a8("serial: 8250_dw: Add support for deferred probing")
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/tty/serial/8250/8250_dw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index e199696..b022f5a 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -462,7 +462,7 @@ static int dw8250_probe(struct platform_device *pdev)
 	}
 
 	data->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
-	if (IS_ERR(data->clk) && PTR_ERR(data->clk) == -EPROBE_DEFER) {
+	if (IS_ERR(data->pclk) && PTR_ERR(data->pclk) == -EPROBE_DEFER) {
 		err = -EPROBE_DEFER;
 		goto err_clk;
 	}
-- 
2.6.0.GIT

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: 8250_dw: Check the data->pclk when get apb_pclk
  2016-08-24  8:33 [PATCH] serial: 8250_dw: Check the data->pclk when get apb_pclk Kefeng Wang
@ 2016-08-25 12:55 ` Andy Shevchenko
  2016-08-25 13:10   ` Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2016-08-25 12:55 UTC (permalink / raw)
  To: Kefeng Wang, Greg Kroah-Hartman
  Cc: Chen-Yu Tsai, Jiri Slaby, Heikki Krogerus, guohanjun,
	linux-serial, linux-kernel

On Wed, 2016-08-24 at 16:33 +0800, Kefeng Wang wrote:
> It should check the data->pclk, not data->clk when get apb_pclk.
> 
> Fixes: c8ed99d4f6a8("serial: 8250_dw: Add support for deferred
> probing")
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>

pclk is optional on Intel platforms. With your patch we always will get
EPROBE_DEFER that obviously breaks things.

> ---
>  drivers/tty/serial/8250/8250_dw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_dw.c
> b/drivers/tty/serial/8250/8250_dw.c
> index e199696..b022f5a 100644
> --- a/drivers/tty/serial/8250/8250_dw.c
> +++ b/drivers/tty/serial/8250/8250_dw.c
> @@ -462,7 +462,7 @@ static int dw8250_probe(struct platform_device
> *pdev)
>  	}
>  
>  	data->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
> -	if (IS_ERR(data->clk) && PTR_ERR(data->clk) == -EPROBE_DEFER)
> {
> +	if (IS_ERR(data->pclk) && PTR_ERR(data->pclk) ==
> -EPROBE_DEFER) {
>  		err = -EPROBE_DEFER;
>  		goto err_clk;
>  	}

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: 8250_dw: Check the data->pclk when get apb_pclk
  2016-08-25 12:55 ` Andy Shevchenko
@ 2016-08-25 13:10   ` Andy Shevchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2016-08-25 13:10 UTC (permalink / raw)
  To: Kefeng Wang, Greg Kroah-Hartman
  Cc: Chen-Yu Tsai, Jiri Slaby, Heikki Krogerus, guohanjun,
	linux-serial, linux-kernel

On Thu, 2016-08-25 at 15:55 +0300, Andy Shevchenko wrote:
> On Wed, 2016-08-24 at 16:33 +0800, Kefeng Wang wrote:
> > 
> > It should check the data->pclk, not data->clk when get apb_pclk.
> > 
> > Fixes: c8ed99d4f6a8("serial: 8250_dw: Add support for deferred
> > probing")
> > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> 
> pclk is optional on Intel platforms. With your patch we always will
> get
> EPROBE_DEFER that obviously breaks things.

Ah, sorry, it was another culprit.

Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> 
> > 
> > ---
> >  drivers/tty/serial/8250/8250_dw.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/tty/serial/8250/8250_dw.c
> > b/drivers/tty/serial/8250/8250_dw.c
> > index e199696..b022f5a 100644
> > --- a/drivers/tty/serial/8250/8250_dw.c
> > +++ b/drivers/tty/serial/8250/8250_dw.c
> > @@ -462,7 +462,7 @@ static int dw8250_probe(struct platform_device
> > *pdev)
> >  	}
> >  
> >  	data->pclk = devm_clk_get(&pdev->dev, "apb_pclk");
> > -	if (IS_ERR(data->clk) && PTR_ERR(data->clk) ==
> > -EPROBE_DEFER)
> > {
> > +	if (IS_ERR(data->pclk) && PTR_ERR(data->pclk) ==
> > -EPROBE_DEFER) {
> >  		err = -EPROBE_DEFER;
> >  		goto err_clk;
> >  	}
> 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-25 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24  8:33 [PATCH] serial: 8250_dw: Check the data->pclk when get apb_pclk Kefeng Wang
2016-08-25 12:55 ` Andy Shevchenko
2016-08-25 13:10   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).