From: Jeongtae Park Date: Mon, 7 May 2018 02:58:21 +0000 (+0900) Subject: [COMMON] fimc-is2: clean-up csi_dma_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fea10a3d6ea39c856d14b32fd33948053a79ac4e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: clean-up csi_dma_probe() Change-Id: I4b758d3a8954d4cfe48745230b7776de2d2b129b Signed-off-by: Jeongtae Park --- diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-csi_v4.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-csi_v4.c index 2b6aab22ee63..a42d0bb96acc 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-csi_v4.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-csi_v4.c @@ -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;