camera: camsys_drv: v0.8.0
authorddl <ddl@rock-chips.com>
Wed, 7 May 2014 02:30:53 +0000 (10:30 +0800)
committerddl <ddl@rock-chips.com>
Wed, 7 May 2014 02:31:06 +0000 (10:31 +0800)
drivers/media/video/rk_camsys/camsys_drv.c
drivers/media/video/rk_camsys/camsys_internal.h

index bd9df09af296d06469b4086e9b5777a056c5e4f0..29faf843841cd315b9e5e887365899c887332ed1 100755 (executable)
@@ -263,7 +263,7 @@ static int camsys_extdev_deregister(unsigned int dev_id, camsys_dev_t *camsys_de
         }
 
         extdev = camsys_find_extdev(dev_id, camsys_dev);
-        if (extdev != NULL) {
+        if (extdev == NULL) {
             err = -EINVAL;
             camsys_warn("Extdev(dev_id: 0x%x) isn't registered in %s!",
                 dev_id, dev_name(camsys_dev->miscdev.this_device));
@@ -294,9 +294,11 @@ static int camsys_extdev_deregister(unsigned int dev_id, camsys_dev_t *camsys_de
         list_del_init(&extdev->active);
         //spin_unlock(&camsys_dev->lock);
         mutex_unlock(&camsys_dev->extdevs.mut);
+        
+        camsys_trace(1,"Extdev(dev_id: 0x%x) is deregister success", extdev->dev_id);
         kfree(extdev);
         extdev = NULL;
-        camsys_trace(1,"Extdev(dev_id: 0x%x) is deregister success", extdev->dev_id);
+        
     } else {
         //spin_lock(&camsys_dev->lock);
         mutex_lock(&camsys_dev->extdevs.mut);
index bf7a0d2c2375b28d79cb509ad4925504f1fb7732..723d73cf4a19a0e57276550d76794b457a5b96f6 100755 (executable)
 *        3) add soft rest callback;
 *v0.7.0:
 *        1) check extdev is activate or not before delete from camsys_dev active list;
+*v0.8.0:
+*        1) fix deregister a unregister extdev oops in camsys_extdev_deregister;
 */
-#define CAMSYS_DRIVER_VERSION                   KERNEL_VERSION(0,7,0)
+#define CAMSYS_DRIVER_VERSION                   KERNEL_VERSION(0,8,0)
 
 
 #define CAMSYS_PLATFORM_DRV_NAME                "RockChip-CamSys"