From ac09f13c9485c057458492805f18f420fd40ceb4 Mon Sep 17 00:00:00 2001 From: ddl Date: Wed, 7 May 2014 10:30:53 +0800 Subject: [PATCH] camera: camsys_drv: v0.8.0 --- drivers/media/video/rk_camsys/camsys_drv.c | 6 ++++-- drivers/media/video/rk_camsys/camsys_internal.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/rk_camsys/camsys_drv.c b/drivers/media/video/rk_camsys/camsys_drv.c index bd9df09af296..29faf843841c 100755 --- a/drivers/media/video/rk_camsys/camsys_drv.c +++ b/drivers/media/video/rk_camsys/camsys_drv.c @@ -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); diff --git a/drivers/media/video/rk_camsys/camsys_internal.h b/drivers/media/video/rk_camsys/camsys_internal.h index bf7a0d2c2375..723d73cf4a19 100755 --- a/drivers/media/video/rk_camsys/camsys_internal.h +++ b/drivers/media/video/rk_camsys/camsys_internal.h @@ -69,8 +69,10 @@ * 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" -- 2.34.1