From 54bddb9d741788db0ce05497b20218a8411d08ff Mon Sep 17 00:00:00 2001 From: Vishalsingh Hajeri Date: Fri, 10 Apr 2020 15:22:15 -0700 Subject: [PATCH] msm: camera: isp: change variables declaration to static Static variables are initialized only once and the compiler persists with the variable till the end of the program hence declaring some of the varaibles in header files as static. CRs-Fixed: 2663712 Change-Id: I55265f5ac1d144ae5b5c62a9984c08d242be157d Signed-off-by: Vishalsingh Hajeri --- .../isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170.h | 12 ++++++------ .../isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170_150.h | 10 +++++----- .../isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175.h | 10 +++++----- .../isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175_130.h | 10 +++++----- .../isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe480.h | 2 +- .../isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe580.h | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170.h index 07d821871b5e..a16c9d510f40 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170.h @@ -77,25 +77,25 @@ static struct cam_vfe_camif_reg_data vfe_170_camif_reg_data = { .enable_diagnostic_hw = 0x1, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_170_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_170_reg = { .reset = 0x0000001C, .cgc_ovd = 0x0000002C, .enable = 0x00000040, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_170_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_170_reg = { .reset = 0x00000020, .cgc_ovd = 0x00000030, .enable = 0x00000044, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl color_170_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl color_170_reg = { .reset = 0x00000024, .cgc_ovd = 0x00000034, .enable = 0x00000048, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_170_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_170_reg = { .reset = 0x00000028, .cgc_ovd = 0x00000038, .enable = 0x0000004C, @@ -853,7 +853,7 @@ static struct cam_vfe_bus_ver2_hw_info vfe170_bus_hw_info = { .top_irq_shift = 9, }; -struct cam_vfe_hw_info cam_vfe170_hw_info = { +static struct cam_vfe_hw_info cam_vfe170_hw_info = { .irq_reg_info = &vfe170_top_irq_reg_info, .bus_version = CAM_VFE_BUS_VER_2_0, @@ -866,7 +866,7 @@ struct cam_vfe_hw_info cam_vfe170_hw_info = { .camif_reg = &vfe170_camif_reg, .camif_lite_version = 0, - .camif_reg = NULL, + .camif_lite_reg = NULL, }; diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170_150.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170_150.h index df5cc3594b98..9aa1c05c1904 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170_150.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe170_150.h @@ -79,25 +79,25 @@ static struct cam_vfe_camif_reg_data vfe_170_150_camif_reg_data = { .dual_vfe_sync_mask = 0x3, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_170_150_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_170_150_reg = { .reset = 0x0000001C, .cgc_ovd = 0x0000002C, .enable = 0x00000040, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_170_150_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_170_150_reg = { .reset = 0x00000020, .cgc_ovd = 0x00000030, .enable = 0x00000044, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl color_170_150_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl color_170_150_reg = { .reset = 0x00000024, .cgc_ovd = 0x00000034, .enable = 0x00000048, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_170_150_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_170_150_reg = { .reset = 0x00000028, .cgc_ovd = 0x00000038, .enable = 0x0000004C, @@ -830,7 +830,7 @@ static struct cam_vfe_bus_ver2_hw_info vfe170_150_bus_hw_info = { }, }; -struct cam_vfe_hw_info cam_vfe170_150_hw_info = { +static struct cam_vfe_hw_info cam_vfe170_150_hw_info = { .irq_reg_info = &vfe170_150_top_irq_reg_info, .bus_version = CAM_VFE_BUS_VER_2_0, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175.h index ccc771c993c2..111eb486d592 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175.h @@ -104,25 +104,25 @@ static struct cam_vfe_camif_lite_ver2_reg_data vfe175_camif_lite_reg_data = { .dual_pd_path_sel_shift = 24, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_175_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_175_reg = { .reset = 0x0000001C, .cgc_ovd = 0x0000002C, .enable = 0x00000040, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_175_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_175_reg = { .reset = 0x00000020, .cgc_ovd = 0x00000030, .enable = 0x00000044, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl color_175_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl color_175_reg = { .reset = 0x00000024, .cgc_ovd = 0x00000034, .enable = 0x00000048, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_175_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_175_reg = { .reset = 0x00000028, .cgc_ovd = 0x00000038, .enable = 0x0000004C, @@ -1023,7 +1023,7 @@ static struct cam_vfe_bus_ver2_hw_info vfe175_bus_hw_info = { .top_irq_shift = 9, }; -struct cam_vfe_hw_info cam_vfe175_hw_info = { +static struct cam_vfe_hw_info cam_vfe175_hw_info = { .irq_reg_info = &vfe175_top_irq_reg_info, .bus_version = CAM_VFE_BUS_VER_2_0, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175_130.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175_130.h index 7573407af078..a1df85c12388 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175_130.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe175_130.h @@ -152,25 +152,25 @@ static struct cam_vfe_camif_lite_ver2_reg_data .dual_pd_path_sel_shift = 24, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_175_130_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl lens_175_130_reg = { .reset = 0x0000001C, .cgc_ovd = 0x0000002C, .enable = 0x00000040, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_175_130_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl stats_175_130_reg = { .reset = 0x00000020, .cgc_ovd = 0x00000030, .enable = 0x00000044, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl color_175_130_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl color_175_130_reg = { .reset = 0x00000024, .cgc_ovd = 0x00000034, .enable = 0x00000048, }; -struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_175_130_reg = { +static struct cam_vfe_top_ver2_reg_offset_module_ctrl zoom_175_130_reg = { .reset = 0x00000028, .cgc_ovd = 0x00000038, .enable = 0x0000004C, @@ -1129,7 +1129,7 @@ static struct cam_vfe_bus_ver2_hw_info vfe175_130_bus_hw_info = { .top_irq_shift = 9, }; -struct cam_vfe_hw_info cam_vfe175_130_hw_info = { +static struct cam_vfe_hw_info cam_vfe175_130_hw_info = { .irq_reg_info = &vfe175_130_top_irq_reg_info, .bus_version = CAM_VFE_BUS_VER_2_0, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe480.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe480.h index 359c43ae0c6f..1d9173a0c73b 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe480.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe480.h @@ -1364,7 +1364,7 @@ static struct cam_vfe_bus_rd_ver1_hw_info vfe480_bus_rd_hw_info = { .top_irq_shift = 8, }; -struct cam_vfe_hw_info cam_vfe480_hw_info = { +static struct cam_vfe_hw_info cam_vfe480_hw_info = { .irq_reg_info = &vfe480_top_irq_reg_info, .bus_version = CAM_VFE_BUS_VER_3_0, diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe580.h b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe580.h index 8bb01532e807..8c854a5f5482 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe580.h +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe17x/cam_vfe580.h @@ -105,7 +105,7 @@ static struct cam_vfe_top_ver3_hw_info vfe580_top_hw_info = { }, }; -struct cam_vfe_hw_info cam_vfe580_hw_info = { +static struct cam_vfe_hw_info cam_vfe580_hw_info = { .irq_reg_info = &vfe480_top_irq_reg_info, .bus_version = CAM_VFE_BUS_VER_3_0,