[COMMON] fimc-is2: clean-up csi_dma_probe()
authorJeongtae Park <jtp.park@samsung.com>
Mon, 7 May 2018 02:58:21 +0000 (11:58 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:05:11 +0000 (17:05 +0900)
Change-Id: I4b758d3a8954d4cfe48745230b7776de2d2b129b
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-device-csi_v4.c

index 2b6aab22ee63151056e03b59f50de3cdff4eabb3..a42d0bb96acc5f68cc4a2ea22efe8826505d0364 100644 (file)
@@ -2110,19 +2110,19 @@ err_alloc_csi:
 int fimc_is_csi_dma_probe(struct fimc_is_device_csi_dma *csi_dma, struct platform_device *pdev)
 {
        int ret = 0;
-       struct resource *mem_res = NULL;
+       struct resource *res;
 
        /* Get SFR base register */
-       mem_res = platform_get_resource(pdev, IORESOURCE_MEM, IORESOURCE_CSIS_DMA);
-       if (!mem_res) {
-               probe_err("Failed to get CSIS_DMA io memory region(%p)", mem_res);
+       res = platform_get_resource(pdev, IORESOURCE_MEM, IORESOURCE_CSIS_DMA);
+       if (!res) {
+               probe_err("Failed to get CSIS_DMA io memory region(%p)", res);
                ret = -EBUSY;
                goto err_get_resource_csis_dma;
        }
 
-       csi_dma->regs_start = mem_res->start;
-       csi_dma->regs_end = mem_res->end;
-       csi_dma->base_reg =  devm_ioremap_nocache(&pdev->dev, mem_res->start, resource_size(mem_res));
+       csi_dma->regs_start = res->start;
+       csi_dma->regs_end = res->end;
+       csi_dma->base_reg =  devm_ioremap_nocache(&pdev->dev, res->start, resource_size(res));
        if (!csi_dma->base_reg) {
                probe_err("Failed to remap CSIS_DMA io region(%p)", csi_dma->base_reg);
                ret = -ENOMEM;
@@ -2138,9 +2138,9 @@ int fimc_is_csi_dma_probe(struct fimc_is_device_csi_dma *csi_dma, struct platfor
                goto err_get_resource_stat_dma;
        }
 
-       csi_dma->regs_start = mem_res->start;
-       csi_dma->regs_end = mem_res->end;
-       csi_dma->base_reg_stat =  devm_ioremap_nocache(&pdev->dev, mem_res->start, resource_size(mem_res));
+       csi_dma->regs_start = res->start;
+       csi_dma->regs_end = res->end;
+       csi_dma->base_reg_stat =  devm_ioremap_nocache(&pdev->dev, res->start, resource_size(res));
        if (!csi_dma->base_reg_stat) {
                probe_err("Failed to remap STAT_DMA io region(%p)", csi_dma->base_reg_stat);
                ret = -ENOMEM;