diff mbox

[2/2] cpts: fix a run time warn_on.

Message ID ad26ca328f0eba6a722d0288ac1c37ad55789447.1356204860.git.richardcochran@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Richard Cochran Dec. 22, 2012, 7:41 p.m. UTC
This patch fixes a warning in clk_enable by calling clk_prepare first.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
 drivers/net/ethernet/ti/cpts.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Sergei Shtylyov Dec. 23, 2012, 2:07 p.m. UTC | #1
Hello.

On 22-12-2012 23:41, Richard Cochran wrote:

> This patch fixes a warning in clk_enable by calling clk_prepare first.

> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
> ---
>   drivers/net/ethernet/ti/cpts.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)

> diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
> index 5ab8fb4..3e32a31 100644
> --- a/drivers/net/ethernet/ti/cpts.c
> +++ b/drivers/net/ethernet/ti/cpts.c
> @@ -247,6 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
>   		cpts->refclk = NULL;
>   		return;
>   	}
> +	clk_prepare(cpts->refclk);
>   	clk_enable(cpts->refclk);

    Maybe just call clk_prepare_enable() instead?

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Richard Cochran Dec. 24, 2012, 6:46 a.m. UTC | #2
On Sun, Dec 23, 2012 at 06:07:22PM +0400, Sergei Shtylyov wrote:
> Hello.
> 
> On 22-12-2012 23:41, Richard Cochran wrote:
> 
> >This patch fixes a warning in clk_enable by calling clk_prepare first.
> 
> >Signed-off-by: Richard Cochran <richardcochran@gmail.com>
> >---
> >  drivers/net/ethernet/ti/cpts.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> >diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
> >index 5ab8fb4..3e32a31 100644
> >--- a/drivers/net/ethernet/ti/cpts.c
> >+++ b/drivers/net/ethernet/ti/cpts.c
> >@@ -247,6 +247,7 @@ static void cpts_clk_init(struct cpts *cpts)
> >  		cpts->refclk = NULL;
> >  		return;
> >  	}
> >+	clk_prepare(cpts->refclk);
> >  	clk_enable(cpts->refclk);
> 
>    Maybe just call clk_prepare_enable() instead?

Okay, will fix in v2.

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 5ab8fb4..3e32a31 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -247,6 +247,7 @@  static void cpts_clk_init(struct cpts *cpts)
 		cpts->refclk = NULL;
 		return;
 	}
+	clk_prepare(cpts->refclk);
 	clk_enable(cpts->refclk);
 }