crypto: s5p-sss - Use devm_clk_get()
Subsystems (2)
PATCH 1/1 crypto: s5p-sss - Use devm_clk_get()
The devm_ functions allocate memory that is released when a driver detaches. This patch uses devm_clk_get() for these functions. These make the code smaller and a bit simpler
Signed-off-by Jingoo Han <[email protected]>
--- drivers/crypto/s5p-sss.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
drivers/crypto/s5p-sss.c +1 -3
@@ -580,7 +580,7 @@ static int s5p_aes_probe(struct platform_device *pdev) resource_size(res), pdev->name))return -EBUSY ; - pdata->clk =clk_get (dev,"secss" ); + pdata->clk =devm_clk_get (dev,"secss" );if (IS_ERR (pdata->clk)) {dev_err (dev,"failed to find secss clock source\n" );return -ENOENT ;
@@ -645,7 +645,6 @@ static int s5p_aes_probe(struct platform_device *pdev) err_irq:clk_disable (pdata->clk); -clk_put (pdata->clk); s5p_dev =NULL ;platform_set_drvdata (pdev,NULL );
@@ -667,7 +666,6 @@ static int s5p_aes_remove(struct platform_device *pdev)tasklet_kill (&pdata->tasklet);clk_disable (pdata->clk); -clk_put (pdata->clk); s5p_dev =NULL ;platform_set_drvdata (pdev,NULL );
Signature · 1 line
1.7.2.5