camera: add notice message when sensor driver is new,but sensor device registered...
authorddl <ddl@rock-chips.com>
Thu, 11 Apr 2013 09:56:12 +0000 (17:56 +0800)
committerddl <ddl@rock-chips.com>
Thu, 11 Apr 2013 09:56:20 +0000 (17:56 +0800)
drivers/media/video/generic_sensor.h

index 8c674caafa1c3bb0af3b434bbae2339acaf4b0c7..faf11af6aa1c6b961a6b082102e4fae9ea2268c0 100755 (executable)
@@ -684,6 +684,11 @@ static inline int sensor_face_detect_default_cb(struct soc_camera_device *icd, s
     int config_flash = 0;\\r
     int sensor_config;\\r
  \\r
+    if (pdata == NULL) {\\r
+        printk("WARNING: Camera sensor device is registered in board by CONFIG_SENSOR_XX,\n"\\r
+               "Please register camera sesnor deivce in struct rkcamera_platform_data new_camera[]\n");\\r
+        BUG();\\r
+    }\\r
     sensor_config = SensorConfiguration;\\r
     new_camera = pdata->register_dev_new; \\r
     while (strstr(new_camera->dev_name,"end")==NULL) { \\r