This patch cleans up the driver for,
- Use devm_kcalloc varient instead of devm_kzalloc for array
allocation.
- clk_prepare/unprepare, remove "ret" variable as it is not required
- use __exit for cleanup function
As I am referring this driver as a reference for my 88pm800 clk driver,
applying same changes here as well.
Signed-off-by: Vaibhav Hiremath <redacted>
---
Since I do not have platform to test, it would be helpful if someone
tests it for me.
I have build tested it.
drivers/clk/clk-s2mps11.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
Hi Vaibhav,
On 22 July 2015 at 15:04, Vaibhav Hiremath [off-list ref] wrote:
quoted hunk
This patch cleans up the driver for,
- Use devm_kcalloc varient instead of devm_kzalloc for array
allocation.
- clk_prepare/unprepare, remove "ret" variable as it is not required
- use __exit for cleanup function
As I am referring this driver as a reference for my 88pm800 clk driver,
applying same changes here as well.
Signed-off-by: Vaibhav Hiremath <redacted>
---
Since I do not have platform to test, it would be helpful if someone
tests it for me.
I have build tested it.
drivers/clk/clk-s2mps11.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
@@ -186,15 +182,15 @@ static int s2mps11_clk_probe(struct platform_device *pdev)structclk_init_data*clks_init;inti,ret=0;-s2mps11_clks=devm_kzalloc(&pdev->dev,sizeof(*s2mps11_clk)*-S2MPS11_CLKS_NUM,GFP_KERNEL);+s2mps11_clks=devm_kcalloc(&pdev->dev,S2MPS11_CLKS_NUM,+sizeof(*s2mps11_clk),GFP_KERNEL);if(!s2mps11_clks)return-ENOMEM;s2mps11_clk=s2mps11_clks;-clk_table=devm_kzalloc(&pdev->dev,sizeof(structclk*)*-S2MPS11_CLKS_NUM,GFP_KERNEL);+clk_table=devm_kcalloc(&pdev->dev,S2MPS11_CLKS_NUM,+sizeof(structclk*),GFP_KERNEL);if(!clk_table)return-ENOMEM;
@@ -322,7 +318,7 @@ static int __init s2mps11_clk_init(void)}subsys_initcall(s2mps11_clk_init);-staticvoid__inits2mps11_clk_cleanup(void)+staticvoid__exits2mps11_clk_cleanup(void){platform_driver_unregister(&s2mps11_clk_driver);}--
1.9.1
Tested on Odroid-XU3 board.
Tested-by: Anand Moon <redacted>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday 22 July 2015 05:09 PM, Anand Moon wrote:
Hi Vaibhav,
On 22 July 2015 at 15:04, Vaibhav Hiremath [off-list ref] wrote:
quoted
This patch cleans up the driver for,
- Use devm_kcalloc varient instead of devm_kzalloc for array
allocation.
- clk_prepare/unprepare, remove "ret" variable as it is not required
- use __exit for cleanup function
As I am referring this driver as a reference for my 88pm800 clk driver,
applying same changes here as well.
Signed-off-by: Vaibhav Hiremath <redacted>
---
Since I do not have platform to test, it would be helpful if someone
tests it for me.
I have build tested it.
drivers/clk/clk-s2mps11.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
From: Krzysztof Kozlowski <hidden> Date: 2015-07-23 00:38:27
On 22.07.2015 18:34, Vaibhav Hiremath wrote:
This patch cleans up the driver for,
- Use devm_kcalloc varient instead of devm_kzalloc for array
allocation.
- clk_prepare/unprepare, remove "ret" variable as it is not required
- use __exit for cleanup function
As I am referring this driver as a reference for my 88pm800 clk driver,
applying same changes here as well.
Signed-off-by: Vaibhav Hiremath <redacted>
---
Since I do not have platform to test, it would be helpful if someone
tests it for me.
I have build tested it.
drivers/clk/clk-s2mps11.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
Looks good, simplifies the code and fixes the __init/__exit.
Reviewed-by: Krzysztof Kozlowski <redacted>
Best regards,
Krzysztof
From: Stephen Boyd <hidden> Date: 2015-07-24 21:39:05
On 07/22, Vaibhav Hiremath wrote:
This patch cleans up the driver for,
- Use devm_kcalloc varient instead of devm_kzalloc for array
allocation.
- clk_prepare/unprepare, remove "ret" variable as it is not required
- use __exit for cleanup function
As I am referring this driver as a reference for my 88pm800 clk driver,
applying same changes here as well.
Signed-off-by: Vaibhav Hiremath <redacted>
---
Applied to clk-next
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project