From 720ea6ad511a47ea3e7ea609d453062b5f56f314 Mon Sep 17 00:00:00 2001 From: ddl Date: Thu, 11 Apr 2013 17:56:12 +0800 Subject: [PATCH] camera: add notice message when sensor driver is new,but sensor device registered in board file by old --- drivers/media/video/generic_sensor.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/video/generic_sensor.h b/drivers/media/video/generic_sensor.h index 8c674caafa1c..faf11af6aa1c 100755 --- a/drivers/media/video/generic_sensor.h +++ b/drivers/media/video/generic_sensor.h @@ -684,6 +684,11 @@ static inline int sensor_face_detect_default_cb(struct soc_camera_device *icd, s int config_flash = 0;\ int sensor_config;\ \ + if (pdata == NULL) {\ + printk("WARNING: Camera sensor device is registered in board by CONFIG_SENSOR_XX,\n"\ + "Please register camera sesnor deivce in struct rkcamera_platform_data new_camera[]\n");\ + BUG();\ + }\ sensor_config = SensorConfiguration;\ new_camera = pdata->register_dev_new; \ while (strstr(new_camera->dev_name,"end")==NULL) { \ -- 2.34.1