From: Seung-Woo Kim Date: Thu, 26 Dec 2024 09:27:29 +0000 (+0900) Subject: media: spacemit: cam_isp: Fix declaration X-Git-Tag: accepted/tizen/unified/20250514.114144~54 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce9fbabd0a25f9a346045803da3781c55c542d61;p=platform%2Fkernel%2Flinux-riscv.git media: spacemit: cam_isp: Fix declaration Some compilers give an error, "a label can only be part of a statement and a declaration is not a statement" for declaration in middle of statement. Fix the error by moving declaration to function top. Change-Id: I4abcb45fd8b6824869d772bc1fda2083ae7475c0 Signed-off-by: Seung-Woo Kim --- diff --git a/drivers/media/platform/spacemit/camera/cam_isp/k1x_isp_pipe.c b/drivers/media/platform/spacemit/camera/cam_isp/k1x_isp_pipe.c index affac933649a..606f8977f55a 100644 --- a/drivers/media/platform/spacemit/camera/cam_isp/k1x_isp_pipe.c +++ b/drivers/media/platform/spacemit/camera/cam_isp/k1x_isp_pipe.c @@ -929,6 +929,7 @@ long k1xisp_pipe_ioctl_core(struct file *file, unsigned int cmd, unsigned long a { int ret = 0; struct k1xisp_pipe_dev *pipe_dev = file->private_data; + struct isp_regs_info *user_regs; ISP_DRV_CHECK_POINTER(pipe_dev); switch (cmd) { @@ -939,7 +940,7 @@ long k1xisp_pipe_ioctl_core(struct file *file, unsigned int cmd, unsigned long a ret = k1xisp_pipe_undeploy_driver(pipe_dev, *((u32*)arg)); break; case ISP_IOC_SET_REG: - struct isp_regs_info *user_regs = (struct isp_regs_info*)arg; + user_regs = (struct isp_regs_info*)arg; if (pipe_dev->isp_reg_mem[user_regs->mem_index].config) { if (pipe_dev->isp_reg_mem[user_regs->mem_index].mem.fd != user_regs->mem.fd) {