Hello Guennadi,

Thanks for your suggestion, please see my comments below.

Best Regards,
Libin 

>>-----Original Message-----
>>From: Guennadi Liakhovetski [mailto:g.liakhovet...@gmx.de]
>>Sent: Tuesday, 27 November, 2012 18:50
>>To: Albert Wang
>>Cc: cor...@lwn.net; linux-media@vger.kernel.org; Libin Yang
>>Subject: Re: [PATCH 03/15] [media] marvell-ccic: add clock tree support for 
>>marvell-ccic
>>driver
>>
>>> +           mcam->clk_num = pdata->clk_num;
>>> +   } else {
>>> +           for (i = 0; i < pdata->clk_num; i++) {
>>> +                   if (mcam->clk[i]) {
>>> +                           clk_put(mcam->clk[i]);
>>> +                           mcam->clk[i] = NULL;
>>> +                   }
>>> +           }
>>> +           mcam->clk_num = 0;
>>> +   }
>>> +}
>>
>>Don't think I like this. IIUC, your driver should only try to use clocks, 
>>that it knows about,
>>not some random clocks, passed from the platform data. So, you should be 
>>using explicit
>>clock names. In your platform data you can set whether a specific clock 
>>should be used or
>>not, but not pass clock names down. Also you might want to consider using 
>>devm_clk_get()
>>and be more careful with error handling.
>>
>OK, we will try to enhance it.

[Libin] Because there are some boards using mmp chip, and the clock names on 
different board may be totally different. And also this is why the clock number 
is not definite. To support more boards, the dynamic names are used instead of 
the static names.
>
>>>
>>>  static int mmpcam_probe(struct platform_device *pdev)  { @@ -290,6
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to