linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: sh_mmcif: remove unneeded clock connection ID
@ 2012-11-28  9:24 Guennadi Liakhovetski
  2012-11-30  9:02 ` Simon Horman
  0 siblings, 1 reply; 3+ messages in thread
From: Guennadi Liakhovetski @ 2012-11-28  9:24 UTC (permalink / raw)
  To: linux-mmc; +Cc: linux-sh, Chris Ball

MMCIF only uses one clock, all ARM and SuperH platforms register MMCIF
clock lookup entries with no connection ID, hence it can be dropped in
the driver too.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
 drivers/mmc/host/sh_mmcif.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index d25bc97..358295e 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1310,7 +1310,6 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev)
 	struct sh_mmcif_plat_data *pd = pdev->dev.platform_data;
 	struct resource *res;
 	void __iomem *reg;
-	char clk_name[8];
 
 	irq[0] = platform_get_irq(pdev, 0);
 	irq[1] = platform_get_irq(pdev, 1);
@@ -1360,11 +1359,10 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	host->power = false;
 
-	snprintf(clk_name, sizeof(clk_name), "mmc%d", pdev->id);
-	host->hclk = clk_get(&pdev->dev, clk_name);
+	host->hclk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(host->hclk)) {
 		ret = PTR_ERR(host->hclk);
-		dev_err(&pdev->dev, "cannot get clock \"%s\": %d\n", clk_name, ret);
+		dev_err(&pdev->dev, "cannot get clock: %d\n", ret);
 		goto eclkget;
 	}
 	ret = sh_mmcif_clk_update(host);
-- 
1.7.2.5


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

* Re: [PATCH] mmc: sh_mmcif: remove unneeded clock connection ID
  2012-11-28  9:24 [PATCH] mmc: sh_mmcif: remove unneeded clock connection ID Guennadi Liakhovetski
@ 2012-11-30  9:02 ` Simon Horman
  2012-12-03 19:24   ` Chris Ball
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Horman @ 2012-11-30  9:02 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-mmc, linux-sh, Chris Ball

On Wed, Nov 28, 2012 at 10:24:27AM +0100, Guennadi Liakhovetski wrote:
> MMCIF only uses one clock, all ARM and SuperH platforms register MMCIF
> clock lookup entries with no connection ID, hence it can be dropped in
> the driver too.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

> ---
>  drivers/mmc/host/sh_mmcif.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index d25bc97..358295e 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -1310,7 +1310,6 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev)
>  	struct sh_mmcif_plat_data *pd = pdev->dev.platform_data;
>  	struct resource *res;
>  	void __iomem *reg;
> -	char clk_name[8];
>  
>  	irq[0] = platform_get_irq(pdev, 0);
>  	irq[1] = platform_get_irq(pdev, 1);
> @@ -1360,11 +1359,10 @@ static int __devinit sh_mmcif_probe(struct platform_device *pdev)
>  	pm_runtime_enable(&pdev->dev);
>  	host->power = false;
>  
> -	snprintf(clk_name, sizeof(clk_name), "mmc%d", pdev->id);
> -	host->hclk = clk_get(&pdev->dev, clk_name);
> +	host->hclk = clk_get(&pdev->dev, NULL);
>  	if (IS_ERR(host->hclk)) {
>  		ret = PTR_ERR(host->hclk);
> -		dev_err(&pdev->dev, "cannot get clock \"%s\": %d\n", clk_name, ret);
> +		dev_err(&pdev->dev, "cannot get clock: %d\n", ret);
>  		goto eclkget;
>  	}
>  	ret = sh_mmcif_clk_update(host);
> -- 
> 1.7.2.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sh" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] mmc: sh_mmcif: remove unneeded clock connection ID
  2012-11-30  9:02 ` Simon Horman
@ 2012-12-03 19:24   ` Chris Ball
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-12-03 19:24 UTC (permalink / raw)
  To: Simon Horman; +Cc: Guennadi Liakhovetski, linux-mmc, linux-sh

Hi,

On Fri, Nov 30 2012, Simon Horman wrote:
> On Wed, Nov 28, 2012 at 10:24:27AM +0100, Guennadi Liakhovetski wrote:
>> MMCIF only uses one clock, all ARM and SuperH platforms register MMCIF
>> clock lookup entries with no connection ID, hence it can be dropped in
>> the driver too.
>> 
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

Thanks, pushed to mmc-next for 3.8.

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

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

end of thread, other threads:[~2012-12-03 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28  9:24 [PATCH] mmc: sh_mmcif: remove unneeded clock connection ID Guennadi Liakhovetski
2012-11-30  9:02 ` Simon Horman
2012-12-03 19:24   ` Chris Ball

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).