lkml.org 
[lkml]   [2013]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V3 1/6] clk: exynos-audss: convert to platform device
From
>> +static int exynos_audss_clk_remove(struct platform_device *pdev)
>> +{
>> + int i;
>> +
>> + of_clk_del_provider(pdev->dev.of_node);
>> +
>> + for (i = 0; i< EXYNOS_AUDSS_MAX_CLKS; i++) {
>> + if (!IS_ERR_OR_NULL(clk_table[i]))
>> + clk_unregister(clk_table[i]);
>> + }
>
>
> Since we only get here if all the clocks are registered properly and we
> always register EXYNOS_AUDSS_MAX_CLKS clocks, couldn't this simply be:
>
>
> for (i = 0; i < EXYNOS_AUDSS_MAX_CLKS; i++)
> clk_unregister(clk_table[i]);
>
> ?

Once support is added for Exynos5420, we won't always register
EXYNOS_AUDSS_MAX_CLKS clocks, so we'd still need the NULL check.

Thanks,
Andrew


\
 
 \ /
  Last update: 2013-09-25 00:21    [W:0.118 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site