[PATCH] s5p-fimc: Use correct API for register memory region release

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

 



As the memory region is requested with request_mem_region use the proper 
paired method for releasing it.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
 drivers/media/video/s5p-fimc/fimc-core.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c
index 81bcbb9..14d3755 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.c
+++ b/drivers/media/video/s5p-fimc/fimc-core.c
@@ -1764,8 +1764,8 @@ err_clk:
 err_regs_unmap:
 	iounmap(fimc->regs);
 err_req_region:
-	release_resource(fimc->regs_res);
-	kfree(fimc->regs_res);
+	release_mem_region(fimc->regs_res->start,
+			   resource_size(fimc->regs_res));
 err_info:
 	kfree(fimc);
 	return ret;
@@ -1856,8 +1856,8 @@ static int __devexit fimc_remove(struct platform_device *pdev)
 	fimc_clk_put(fimc);
 	free_irq(fimc->irq, fimc);
 	iounmap(fimc->regs);
-	release_resource(fimc->regs_res);
-	kfree(fimc->regs_res);
+	release_mem_region(fimc->regs_res->start,
+			   resource_size(fimc->regs_res));
 	kfree(fimc);
 
 	dev_info(&pdev->dev, "driver unloaded\n");
-- 
1.7.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux