From: ddl Date: Thu, 11 Apr 2013 09:56:12 +0000 (+0800) Subject: camera: add notice message when sensor driver is new,but sensor device registered... X-Git-Tag: firefly_0821_release~7276 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=720ea6ad511a47ea3e7ea609d453062b5f56f314;p=firefly-linux-kernel-4.4.55.git camera: add notice message when sensor driver is new,but sensor device registered in board file by old --- 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) { \