Commit d4023a5e authored by Chihau Chau's avatar Chihau Chau Committed by Greg Kroah-Hartman

Staging: dream: camera: msm_camera: fix some code style issues

This fixes some code style issues like else staments after the close
braces '}' and to use __func__ instead of __FUNCTION__.
Signed-off-by: default avatarChihau Chau <chihau@gmail.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 71508ee4
...@@ -670,7 +670,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) ...@@ -670,7 +670,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg)
&(stats.fd)); &(stats.fd));
if (!stats.buffer) { if (!stats.buffer) {
pr_err("%s: msm_pmem_stats_ptov_lookup error\n", pr_err("%s: msm_pmem_stats_ptov_lookup error\n",
__FUNCTION__); __func__);
rc = -EINVAL; rc = -EINVAL;
goto failure; goto failure;
} }
...@@ -718,8 +718,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg) ...@@ -718,8 +718,7 @@ static int msm_get_stats(struct msm_sync *sync, void __user *arg)
buf.fmain.buffer = buf.fmain.buffer =
(unsigned long)region.vaddr; (unsigned long)region.vaddr;
buf.fmain.fd = region.fd; buf.fmain.fd = region.fd;
} } else {
else {
pr_err("%s: pmem lookup failed\n", pr_err("%s: pmem lookup failed\n",
__func__); __func__);
rc = -EINVAL; rc = -EINVAL;
...@@ -838,8 +837,8 @@ static int msm_ctrl_cmd_done(struct msm_control_device *ctrl_pmsm, ...@@ -838,8 +837,8 @@ static int msm_ctrl_cmd_done(struct msm_control_device *ctrl_pmsm,
kfree(qcmd); kfree(qcmd);
goto end; goto end;
} }
} } else
else ctrlcmd->value = NULL; ctrlcmd->value = NULL;
end: end:
CDBG("msm_ctrl_cmd_done: end rc = %d\n", rc); CDBG("msm_ctrl_cmd_done: end rc = %d\n", rc);
...@@ -876,7 +875,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) ...@@ -876,7 +875,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
MSM_PMEM_AEC_AWB, &region[0], MSM_PMEM_AEC_AWB, &region[0],
NUM_WB_EXP_STAT_OUTPUT_BUFFERS); NUM_WB_EXP_STAT_OUTPUT_BUFFERS);
if (!axi_data.bufnum1) { if (!axi_data.bufnum1) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
axi_data.region = &region[0]; axi_data.region = &region[0];
...@@ -888,7 +887,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) ...@@ -888,7 +887,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
MSM_PMEM_AF, &region[0], MSM_PMEM_AF, &region[0],
NUM_AF_STAT_OUTPUT_BUFFERS); NUM_AF_STAT_OUTPUT_BUFFERS);
if (!axi_data.bufnum1) { if (!axi_data.bufnum1) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
axi_data.region = &region[0]; axi_data.region = &region[0];
...@@ -899,7 +898,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg) ...@@ -899,7 +898,7 @@ static int msm_config_vfe(struct msm_sync *sync, void __user *arg)
break; break;
default: default:
pr_err("%s: unknown command type %d\n", pr_err("%s: unknown command type %d\n",
__FUNCTION__, cfgcmd.cmd_type); __func__, cfgcmd.cmd_type);
return -EINVAL; return -EINVAL;
} }
...@@ -928,7 +927,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, ...@@ -928,7 +927,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync,
msm_pmem_region_lookup(&sync->frame, pmem_type, msm_pmem_region_lookup(&sync->frame, pmem_type,
&region[0], 8); &region[0], 8);
if (!axi_data.bufnum1) { if (!axi_data.bufnum1) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
break; break;
...@@ -939,7 +938,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, ...@@ -939,7 +938,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync,
msm_pmem_region_lookup(&sync->frame, pmem_type, msm_pmem_region_lookup(&sync->frame, pmem_type,
&region[0], 8); &region[0], 8);
if (!axi_data.bufnum2) { if (!axi_data.bufnum2) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
break; break;
...@@ -950,7 +949,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, ...@@ -950,7 +949,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync,
msm_pmem_region_lookup(&sync->frame, pmem_type, msm_pmem_region_lookup(&sync->frame, pmem_type,
&region[0], 8); &region[0], 8);
if (!axi_data.bufnum1) { if (!axi_data.bufnum1) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
...@@ -959,7 +958,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, ...@@ -959,7 +958,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync,
msm_pmem_region_lookup(&sync->frame, pmem_type, msm_pmem_region_lookup(&sync->frame, pmem_type,
&region[axi_data.bufnum1], 8); &region[axi_data.bufnum1], 8);
if (!axi_data.bufnum2) { if (!axi_data.bufnum2) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
break; break;
...@@ -970,7 +969,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, ...@@ -970,7 +969,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync,
msm_pmem_region_lookup(&sync->frame, pmem_type, msm_pmem_region_lookup(&sync->frame, pmem_type,
&region[0], 8); &region[0], 8);
if (!axi_data.bufnum2) { if (!axi_data.bufnum2) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
break; break;
...@@ -981,7 +980,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync, ...@@ -981,7 +980,7 @@ static int msm_frame_axi_cfg(struct msm_sync *sync,
default: default:
pr_err("%s: unknown command type %d\n", pr_err("%s: unknown command type %d\n",
__FUNCTION__, cfgcmd->cmd_type); __func__, cfgcmd->cmd_type);
return -EINVAL; return -EINVAL;
} }
...@@ -1047,7 +1046,7 @@ static int __msm_put_frame_buf(struct msm_sync *sync, ...@@ -1047,7 +1046,7 @@ static int __msm_put_frame_buf(struct msm_sync *sync,
rc = sync->vfefn.vfe_config(&cfgcmd, &pphy); rc = sync->vfefn.vfe_config(&cfgcmd, &pphy);
} else { } else {
pr_err("%s: msm_pmem_frame_vtop_lookup failed\n", pr_err("%s: msm_pmem_frame_vtop_lookup failed\n",
__FUNCTION__); __func__);
rc = -EINVAL; rc = -EINVAL;
} }
...@@ -1131,7 +1130,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync, ...@@ -1131,7 +1130,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync,
break; break;
default: default:
pr_err("%s: unknown command type %d\n", pr_err("%s: unknown command type %d\n",
__FUNCTION__, cfgcmd->cmd_type); __func__, cfgcmd->cmd_type);
return -EINVAL; return -EINVAL;
} }
...@@ -1140,7 +1139,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync, ...@@ -1140,7 +1139,7 @@ static int msm_stats_axi_cfg(struct msm_sync *sync,
msm_pmem_region_lookup(&sync->stats, pmem_type, msm_pmem_region_lookup(&sync->stats, pmem_type,
&region[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS); &region[0], NUM_WB_EXP_STAT_OUTPUT_BUFFERS);
if (!axi_data.bufnum1) { if (!axi_data.bufnum1) {
pr_err("%s: pmem region lookup error\n", __FUNCTION__); pr_err("%s: pmem region lookup error\n", __func__);
return -EINVAL; return -EINVAL;
} }
axi_data.region = &region[0]; axi_data.region = &region[0];
...@@ -1177,7 +1176,7 @@ static int msm_put_stats_buffer(struct msm_sync *sync, void __user *arg) ...@@ -1177,7 +1176,7 @@ static int msm_put_stats_buffer(struct msm_sync *sync, void __user *arg)
cfgcmd.cmd_type = CMD_STATS_AF_BUF_RELEASE; cfgcmd.cmd_type = CMD_STATS_AF_BUF_RELEASE;
else { else {
pr_err("%s: invalid buf type %d\n", pr_err("%s: invalid buf type %d\n",
__FUNCTION__, __func__,
buf.type); buf.type);
rc = -EINVAL; rc = -EINVAL;
goto put_done; goto put_done;
...@@ -1223,7 +1222,7 @@ static int msm_axi_config(struct msm_sync *sync, void __user *arg) ...@@ -1223,7 +1222,7 @@ static int msm_axi_config(struct msm_sync *sync, void __user *arg)
default: default:
pr_err("%s: unknown command type %d\n", pr_err("%s: unknown command type %d\n",
__FUNCTION__, __func__,
cfgcmd.cmd_type); cfgcmd.cmd_type);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment