From: Eunyoung Lee Date: Wed, 7 Mar 2018 04:26:00 +0000 (+0900) Subject: [COMMON] fimc-is2: BUG_ON to FIMC_BUG patch of module_framework/cis files_2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca78f20f27b559095f739cfef215577c32924053;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: BUG_ON to FIMC_BUG patch of module_framework/cis files_2 Change-Id: Ic9cdece17dba90c593027106808ec0d206bdd8d5 Signed-off-by: Eunyoung Lee --- diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p7sq.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p7sq.c index 83fb2f13f003..0da78ec56795 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p7sq.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2p7sq.c @@ -59,7 +59,7 @@ static void sensor_2p7sq_cis_data_calculation(const struct sensor_pll_info_compa u32 vt_pix_clk_hz = 0; u32 frame_rate = 0, max_fps = 0, frame_valid_us = 0; - BUG_ON(!pll_info_compact); + FIMC_BUG_VOID(!pll_info_compact); /* 1. get pclk value from pll info */ vt_pix_clk_hz = pll_info_compact->pclk; @@ -123,7 +123,7 @@ static int sensor_2p7sq_wait_stream_off_status(cis_shared_data *cis_data) int ret = 0; u32 timeout = 0; - BUG_ON(!cis_data); + FIMC_BUG(!cis_data); #define STREAM_OFF_WAIT_TIME 250 while (timeout < STREAM_OFF_WAIT_TIME) { @@ -155,7 +155,7 @@ int sensor_2p7sq_cis_init(struct v4l2_subdev *subdev) setinfo.param = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); if (!cis) { @@ -164,7 +164,7 @@ int sensor_2p7sq_cis_init(struct v4l2_subdev *subdev) goto p_err; } - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis->cis_data); memset(cis->cis_data, 0, sizeof(cis_shared_data)); cis->rev_flag = false; @@ -218,7 +218,7 @@ int sensor_2p7sq_cis_log_status(struct v4l2_subdev *subdev) u8 data8 = 0; u16 data16 = 0; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); if (!cis) { @@ -259,12 +259,12 @@ static int sensor_2p7sq_cis_group_param_hold_func(struct v4l2_subdev *subdev, un struct fimc_is_cis *cis = NULL; struct i2c_client *client = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -304,12 +304,12 @@ int sensor_2p7sq_cis_group_param_hold(struct v4l2_subdev *subdev, bool hold) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); ret = sensor_2p7sq_cis_group_param_hold_func(subdev, hold); if (ret < 0) @@ -324,10 +324,10 @@ int sensor_2p7sq_cis_set_global_setting(struct v4l2_subdev *subdev) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); ret = sensor_cis_set_registers(subdev, sensor_2p7sq_global, sensor_2p7sq_global_size); @@ -347,11 +347,11 @@ int sensor_2p7sq_cis_mode_change(struct v4l2_subdev *subdev, u32 mode) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); if (mode > sensor_2p7sq_max_setfile_num) { err("invalid mode(%d)!!", mode); @@ -402,10 +402,10 @@ int sensor_2p7sq_cis_set_size(struct v4l2_subdev *subdev, cis_shared_data *cis_d do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); dbg_sensor(1, "[MOD:D:%d] %s\n", cis->id, __func__); @@ -559,12 +559,12 @@ int sensor_2p7sq_cis_stream_on(struct v4l2_subdev *subdev) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -643,12 +643,12 @@ int sensor_2p7sq_cis_stream_off(struct v4l2_subdev *subdev) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -700,13 +700,13 @@ int sensor_2p7sq_cis_set_exposure_time(struct v4l2_subdev *subdev, struct ae_par do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_exposure); + FIMC_BUG(!subdev); + FIMC_BUG(!target_exposure); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -814,13 +814,13 @@ int sensor_2p7sq_cis_get_min_exposure_time(struct v4l2_subdev *subdev, u32 *min_ do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_expo); + FIMC_BUG(!subdev); + FIMC_BUG(!min_expo); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -867,13 +867,13 @@ int sensor_2p7sq_cis_get_max_exposure_time(struct v4l2_subdev *subdev, u32 *max_ do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_expo); + FIMC_BUG(!subdev); + FIMC_BUG(!max_expo); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -930,13 +930,13 @@ int sensor_2p7sq_cis_adjust_frame_duration(struct v4l2_subdev *subdev, do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_duration); + FIMC_BUG(!subdev); + FIMC_BUG(!target_duration); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -983,12 +983,12 @@ int sensor_2p7sq_cis_set_frame_duration(struct v4l2_subdev *subdev, u32 frame_du do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1058,12 +1058,12 @@ int sensor_2p7sq_cis_set_frame_rate(struct v4l2_subdev *subdev, u32 min_fps) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -1118,13 +1118,13 @@ int sensor_2p7sq_cis_adjust_analog_gain(struct v4l2_subdev *subdev, u32 input_ag do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_permile); + FIMC_BUG(!subdev); + FIMC_BUG(!target_permile); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -1164,12 +1164,12 @@ int sensor_2p7sq_cis_set_analog_gain(struct v4l2_subdev *subdev, struct ae_param do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!again); + FIMC_BUG(!subdev); + FIMC_BUG(!again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1229,12 +1229,12 @@ int sensor_2p7sq_cis_get_analog_gain(struct v4l2_subdev *subdev, u32 *again) do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!again); + FIMC_BUG(!subdev); + FIMC_BUG(!again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1288,13 +1288,13 @@ int sensor_2p7sq_cis_get_min_analog_gain(struct v4l2_subdev *subdev, u32 *min_ag do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_again); + FIMC_BUG(!subdev); + FIMC_BUG(!min_again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1339,13 +1339,13 @@ int sensor_2p7sq_cis_get_max_analog_gain(struct v4l2_subdev *subdev, u32 *max_ag do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_again); + FIMC_BUG(!subdev); + FIMC_BUG(!max_again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1393,13 +1393,13 @@ int sensor_2p7sq_cis_set_digital_gain(struct v4l2_subdev *subdev, struct ae_para do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1478,12 +1478,12 @@ int sensor_2p7sq_cis_get_digital_gain(struct v4l2_subdev *subdev, u32 *dgain) do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1537,13 +1537,13 @@ int sensor_2p7sq_cis_get_min_digital_gain(struct v4l2_subdev *subdev, u32 *min_d do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!min_dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1589,13 +1589,13 @@ int sensor_2p7sq_cis_get_max_digital_gain(struct v4l2_subdev *subdev, u32 *max_d do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!max_dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1669,8 +1669,8 @@ static int cis_2p7sq_probe(struct i2c_client *client, struct device *dev; struct device_node *dnode; - BUG_ON(!client); - BUG_ON(!fimc_is_dev); + FIMC_BUG(!client); + FIMC_BUG(!fimc_is_dev); core = (struct fimc_is_core *)dev_get_drvdata(fimc_is_dev); if (!core) { diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2t7sx.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2t7sx.c index 640938ce3895..b98047a6cb19 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2t7sx.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-2t7sx.c @@ -59,7 +59,7 @@ static void sensor_2t7sx_cis_data_calculation(const struct sensor_pll_info_compa u32 vt_pix_clk_hz = 0; u32 frame_rate = 0, max_fps = 0, frame_valid_us = 0; - BUG_ON(!pll_info_compact); + FIMC_BUG_VOID(!pll_info_compact); /* 1. get pclk value from pll info */ vt_pix_clk_hz = pll_info_compact->pclk; @@ -123,7 +123,7 @@ static int sensor_2t7sx_wait_stream_off_status(cis_shared_data *cis_data) int ret = 0; u32 timeout = 0; - BUG_ON(!cis_data); + FIMC_BUG(!cis_data); #define STREAM_OFF_WAIT_TIME 250 while (timeout < STREAM_OFF_WAIT_TIME) { @@ -155,7 +155,7 @@ int sensor_2t7sx_cis_init(struct v4l2_subdev *subdev) setinfo.param = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); if (!cis) { @@ -164,7 +164,7 @@ int sensor_2t7sx_cis_init(struct v4l2_subdev *subdev) goto p_err; } - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis->cis_data); memset(cis->cis_data, 0, sizeof(cis_shared_data)); cis->rev_flag = false; @@ -218,7 +218,7 @@ int sensor_2t7sx_cis_log_status(struct v4l2_subdev *subdev) u8 data8 = 0; u16 data16 = 0; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); if (!cis) { @@ -259,12 +259,12 @@ static int sensor_2t7sx_cis_group_param_hold_func(struct v4l2_subdev *subdev, un struct fimc_is_cis *cis = NULL; struct i2c_client *client = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -304,12 +304,12 @@ int sensor_2t7sx_cis_group_param_hold(struct v4l2_subdev *subdev, bool hold) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); ret = sensor_2t7sx_cis_group_param_hold_func(subdev, hold); if (ret < 0) @@ -324,10 +324,10 @@ int sensor_2t7sx_cis_set_global_setting(struct v4l2_subdev *subdev) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); ret = sensor_cis_set_registers(subdev, sensor_2t7sx_global, sensor_2t7sx_global_size); @@ -347,11 +347,11 @@ int sensor_2t7sx_cis_mode_change(struct v4l2_subdev *subdev, u32 mode) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); if (mode > sensor_2t7sx_max_setfile_num) { err("invalid mode(%d)!!", mode); @@ -402,10 +402,10 @@ int sensor_2t7sx_cis_set_size(struct v4l2_subdev *subdev, cis_shared_data *cis_d do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); dbg_sensor(1, "[MOD:D:%d] %s\n", cis->id, __func__); @@ -559,12 +559,12 @@ int sensor_2t7sx_cis_stream_on(struct v4l2_subdev *subdev) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -643,12 +643,12 @@ int sensor_2t7sx_cis_stream_off(struct v4l2_subdev *subdev) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -700,13 +700,13 @@ int sensor_2t7sx_cis_set_exposure_time(struct v4l2_subdev *subdev, struct ae_par do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_exposure); + FIMC_BUG(!subdev); + FIMC_BUG(!target_exposure); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -814,13 +814,13 @@ int sensor_2t7sx_cis_get_min_exposure_time(struct v4l2_subdev *subdev, u32 *min_ do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_expo); + FIMC_BUG(!subdev); + FIMC_BUG(!min_expo); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -867,13 +867,13 @@ int sensor_2t7sx_cis_get_max_exposure_time(struct v4l2_subdev *subdev, u32 *max_ do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_expo); + FIMC_BUG(!subdev); + FIMC_BUG(!max_expo); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -930,13 +930,13 @@ int sensor_2t7sx_cis_adjust_frame_duration(struct v4l2_subdev *subdev, do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_duration); + FIMC_BUG(!subdev); + FIMC_BUG(!target_duration); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -983,12 +983,12 @@ int sensor_2t7sx_cis_set_frame_duration(struct v4l2_subdev *subdev, u32 frame_du do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1058,12 +1058,12 @@ int sensor_2t7sx_cis_set_frame_rate(struct v4l2_subdev *subdev, u32 min_fps) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -1118,13 +1118,13 @@ int sensor_2t7sx_cis_adjust_analog_gain(struct v4l2_subdev *subdev, u32 input_ag do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_permile); + FIMC_BUG(!subdev); + FIMC_BUG(!target_permile); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -1164,12 +1164,12 @@ int sensor_2t7sx_cis_set_analog_gain(struct v4l2_subdev *subdev, struct ae_param do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!again); + FIMC_BUG(!subdev); + FIMC_BUG(!again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1229,12 +1229,12 @@ int sensor_2t7sx_cis_get_analog_gain(struct v4l2_subdev *subdev, u32 *again) do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!again); + FIMC_BUG(!subdev); + FIMC_BUG(!again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1288,13 +1288,13 @@ int sensor_2t7sx_cis_get_min_analog_gain(struct v4l2_subdev *subdev, u32 *min_ag do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_again); + FIMC_BUG(!subdev); + FIMC_BUG(!min_again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1339,13 +1339,13 @@ int sensor_2t7sx_cis_get_max_analog_gain(struct v4l2_subdev *subdev, u32 *max_ag do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_again); + FIMC_BUG(!subdev); + FIMC_BUG(!max_again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1393,13 +1393,13 @@ int sensor_2t7sx_cis_set_digital_gain(struct v4l2_subdev *subdev, struct ae_para do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1478,12 +1478,12 @@ int sensor_2t7sx_cis_get_digital_gain(struct v4l2_subdev *subdev, u32 *dgain) do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1537,13 +1537,13 @@ int sensor_2t7sx_cis_get_min_digital_gain(struct v4l2_subdev *subdev, u32 *min_d do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!min_dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1589,13 +1589,13 @@ int sensor_2t7sx_cis_get_max_digital_gain(struct v4l2_subdev *subdev, u32 *max_d do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!max_dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1669,8 +1669,8 @@ static int cis_2t7sx_probe(struct i2c_client *client, struct device *dev; struct device_node *dnode; - BUG_ON(!client); - BUG_ON(!fimc_is_dev); + FIMC_BUG(!client); + FIMC_BUG(!fimc_is_dev); core = (struct fimc_is_core *)dev_get_drvdata(fimc_is_dev); if (!core) { diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-6b2.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-6b2.c index 50e8953ae1b5..23b770a9c05d 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-6b2.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-6b2.c @@ -186,7 +186,7 @@ static void sensor_6b2_cis_data_calculation(const struct sensor_pll_info *pll_in u32 pll_voc_a = 0, vt_pix_clk_hz = 0; u32 frame_rate = 0, max_fps = 0, frame_valid_us = 0; - FIMC_BUG(!pll_info); + FIMC_BUG_VOID(!pll_info); /* 1. mipi data rate calculation (Mbps/Lane) */ /* ToDo: using output Pixel Clock Divider Value */ diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-rpb.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-rpb.c index c2a1d8a6d092..0f576c5dcc7e 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-rpb.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis-rpb.c @@ -62,7 +62,7 @@ static void sensor_rpb_cis_data_calculation(const struct sensor_pll_info_compact u32 frame_rate = 0, max_fps = 0, frame_valid_us = 0; u32 fll = 0, llp = 0; - BUG_ON(!pll_info_compact); + FIMC_BUG_VOID(!pll_info_compact); /* 1. get pclk value from pll info */ vt_pix_clk_hz = pll_info_compact->pclk; @@ -122,7 +122,7 @@ static int sensor_rpb_wait_stream_off_status(cis_shared_data *cis_data) int ret = 0; u32 timeout = 0; - BUG_ON(!cis_data); + FIMC_BUG(!cis_data); #define STREAM_OFF_WAIT_TIME 250 while (timeout < STREAM_OFF_WAIT_TIME) { @@ -154,7 +154,7 @@ int sensor_rpb_cis_init(struct v4l2_subdev *subdev) setinfo.param = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); if (!cis) { @@ -163,7 +163,7 @@ int sensor_rpb_cis_init(struct v4l2_subdev *subdev) goto p_err; } - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis->cis_data); memset(cis->cis_data, 0, sizeof(cis_shared_data)); cis->rev_flag = false; @@ -217,7 +217,7 @@ int sensor_rpb_cis_log_status(struct v4l2_subdev *subdev) u8 data8 = 0; u16 data16 = 0; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); if (!cis) { @@ -258,12 +258,12 @@ static int sensor_rpb_cis_group_param_hold_func(struct v4l2_subdev *subdev, unsi struct fimc_is_cis *cis = NULL; struct i2c_client *client = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -303,12 +303,12 @@ int sensor_rpb_cis_group_param_hold(struct v4l2_subdev *subdev, bool hold) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); ret = sensor_rpb_cis_group_param_hold_func(subdev, hold); if (ret < 0) @@ -323,10 +323,10 @@ int sensor_rpb_cis_set_global_setting(struct v4l2_subdev *subdev) int ret = 0, i; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); for (i = 0; i < RPB_SETFILE_GLOBAL_MAX; i++) { dbg_sensor(0, "[%s] global[%d] setting start ++\n", __func__, i); @@ -349,11 +349,11 @@ int sensor_rpb_cis_mode_change(struct v4l2_subdev *subdev, u32 mode) int ret = 0; struct fimc_is_cis *cis = NULL; - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); if (mode > sensor_rpb_max_setfile_num) { err("invalid mode(%d)!!", mode); @@ -414,10 +414,10 @@ int sensor_rpb_cis_set_size(struct v4l2_subdev *subdev, cis_shared_data *cis_dat do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); dbg_sensor(1, "[MOD:D:%d] %s\n", cis->id, __func__); @@ -571,12 +571,12 @@ int sensor_rpb_cis_stream_on(struct v4l2_subdev *subdev) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -654,12 +654,12 @@ int sensor_rpb_cis_stream_off(struct v4l2_subdev *subdev) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -709,13 +709,13 @@ int sensor_rpb_cis_set_exposure_time(struct v4l2_subdev *subdev, struct ae_param do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_exposure); + FIMC_BUG(!subdev); + FIMC_BUG(!target_exposure); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -823,13 +823,13 @@ int sensor_rpb_cis_get_min_exposure_time(struct v4l2_subdev *subdev, u32 *min_ex do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_expo); + FIMC_BUG(!subdev); + FIMC_BUG(!min_expo); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -876,13 +876,13 @@ int sensor_rpb_cis_get_max_exposure_time(struct v4l2_subdev *subdev, u32 *max_ex do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_expo); + FIMC_BUG(!subdev); + FIMC_BUG(!max_expo); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -939,13 +939,13 @@ int sensor_rpb_cis_adjust_frame_duration(struct v4l2_subdev *subdev, do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_duration); + FIMC_BUG(!subdev); + FIMC_BUG(!target_duration); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -992,12 +992,12 @@ int sensor_rpb_cis_set_frame_duration(struct v4l2_subdev *subdev, u32 frame_dura do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1067,12 +1067,12 @@ int sensor_rpb_cis_set_frame_rate(struct v4l2_subdev *subdev, u32 min_fps) do_gettimeofday(&st); #endif - BUG_ON(!subdev); + FIMC_BUG(!subdev); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -1127,13 +1127,13 @@ int sensor_rpb_cis_adjust_analog_gain(struct v4l2_subdev *subdev, u32 input_agai do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!target_permile); + FIMC_BUG(!subdev); + FIMC_BUG(!target_permile); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); cis_data = cis->cis_data; @@ -1173,12 +1173,12 @@ int sensor_rpb_cis_set_analog_gain(struct v4l2_subdev *subdev, struct ae_param * do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!again); + FIMC_BUG(!subdev); + FIMC_BUG(!again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1238,12 +1238,12 @@ int sensor_rpb_cis_get_analog_gain(struct v4l2_subdev *subdev, u32 *again) do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!again); + FIMC_BUG(!subdev); + FIMC_BUG(!again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1297,13 +1297,13 @@ int sensor_rpb_cis_get_min_analog_gain(struct v4l2_subdev *subdev, u32 *min_agai do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_again); + FIMC_BUG(!subdev); + FIMC_BUG(!min_again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1348,13 +1348,13 @@ int sensor_rpb_cis_get_max_analog_gain(struct v4l2_subdev *subdev, u32 *max_agai do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_again); + FIMC_BUG(!subdev); + FIMC_BUG(!max_again); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1402,13 +1402,13 @@ int sensor_rpb_cis_set_digital_gain(struct v4l2_subdev *subdev, struct ae_param do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1487,12 +1487,12 @@ int sensor_rpb_cis_get_digital_gain(struct v4l2_subdev *subdev, u32 *dgain) do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); + FIMC_BUG(!cis); client = cis->client; if (unlikely(!client)) { @@ -1546,13 +1546,13 @@ int sensor_rpb_cis_get_min_digital_gain(struct v4l2_subdev *subdev, u32 *min_dga do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!min_dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!min_dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1598,13 +1598,13 @@ int sensor_rpb_cis_get_max_digital_gain(struct v4l2_subdev *subdev, u32 *max_dga do_gettimeofday(&st); #endif - BUG_ON(!subdev); - BUG_ON(!max_dgain); + FIMC_BUG(!subdev); + FIMC_BUG(!max_dgain); cis = (struct fimc_is_cis *)v4l2_get_subdevdata(subdev); - BUG_ON(!cis); - BUG_ON(!cis->cis_data); + FIMC_BUG(!cis); + FIMC_BUG(!cis->cis_data); client = cis->client; if (unlikely(!client)) { @@ -1678,8 +1678,8 @@ int cis_rpb_probe(struct i2c_client *client, struct device *dev; struct device_node *dnode; - BUG_ON(!client); - BUG_ON(!fimc_is_dev); + FIMC_BUG(!client); + FIMC_BUG(!fimc_is_dev); core = (struct fimc_is_core *)dev_get_drvdata(fimc_is_dev); if (!core) {