Re: [PATCH 1/5] drm/exynos: Use devm_clk_get in exynos_drm_fimd.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 November 2012 12:10, Inki Dae <inki.dae@xxxxxxxxxxx> wrote:
>
>
>> -----Original Message-----
>> From: Sachin Kamat [mailto:sachin.kamat@xxxxxxxxxx]
>> Sent: Friday, November 23, 2012 12:42 PM
>> To: dri-devel@xxxxxxxxxxxxxxxxxxxxx
>> Cc: inki.dae@xxxxxxxxxxx; jy0922.shim@xxxxxxxxxxx; airlied@xxxxxxxx;
>> sachin.kamat@xxxxxxxxxx; patches@xxxxxxxxxx
>> Subject: [PATCH 1/5] drm/exynos: Use devm_clk_get in exynos_drm_fimd.c
>>
>> devm_clk_get is device managed and makes error handling and exit code
>> simpler.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
>> ---
>>  drivers/gpu/drm/exynos/exynos_drm_fimd.c |    9 ++-------
>>  1 files changed, 2 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> index ad04edd..57851cc 100644
>> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
>> @@ -846,14 +846,14 @@ static int __devinit fimd_probe(struct
>> platform_device *pdev)
>>       if (!ctx)
>>               return -ENOMEM;
>>
>> -     ctx->bus_clk = clk_get(dev, "fimd");
>> +     ctx->bus_clk = devm_clk_get(dev, "fimd");
>>       if (IS_ERR(ctx->bus_clk)) {
>>               dev_err(dev, "failed to get bus clock\n");
>>               ret = PTR_ERR(ctx->bus_clk);
>>               goto err_clk_get;
>>       }
>>
>> -     ctx->lcd_clk = clk_get(dev, "sclk_fimd");
>> +     ctx->lcd_clk = devm_clk_get(dev, "sclk_fimd");
>>       if (IS_ERR(ctx->lcd_clk)) {
>>               dev_err(dev, "failed to get lcd clock\n");
>>               ret = PTR_ERR(ctx->lcd_clk);
>> @@ -918,11 +918,9 @@ static int __devinit fimd_probe(struct
>> platform_device *pdev)
>>
>>  err_clk:
>>       clk_disable(ctx->lcd_clk);
>> -     clk_put(ctx->lcd_clk);
>
> clk_disable shouldn't be called here so let's cleanup this also to reduce
> unnecessary cleanup commits.
>
>>
>>  err_bus_clk:
>>       clk_disable(ctx->bus_clk);
>> -     clk_put(ctx->bus_clk);
>>
>
> Ditto.

OK. I will remove it. Do you want me to re-send only this patch or the
entire series?

>
> Thanks,
> Inki Dae
>
>>  err_clk_get:
>>       return ret;
>> @@ -949,9 +947,6 @@ static int __devexit fimd_remove(struct
>> platform_device *pdev)
>>  out:
>>       pm_runtime_disable(dev);
>>
>> -     clk_put(ctx->lcd_clk);
>> -     clk_put(ctx->bus_clk);
>> -
>>       return 0;
>>  }
>>
>> --
>> 1.7.4.1
>



-- 
With warm regards,
Sachin
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux