aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-04-30 13:56:47 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-05-20 12:32:20 +0200
commit3c0538fbad9f1d07d588f631e380256d941e3d3a (patch)
tree6114c764deaa4ff6e6e49f27d43daf421e236499 /drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
parentmedia: atomisp: cleanup contents of css_2401_system (diff)
downloadwireguard-linux-3c0538fbad9f1d07d588f631e380256d941e3d3a.tar.xz
wireguard-linux-3c0538fbad9f1d07d588f631e380256d941e3d3a.zip
media: atomisp: get rid of most checks for ISP2401 version
There are lots of places inside this driver checking for ISP2400/ISP2401 verison. Get rid of most of those, while keep building for both. Most of stuff in this patch is trivial to solve. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c')
-rw-r--r--drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
index 97670fd9e078..e39cc2132953 100644
--- a/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
+++ b/drivers/staging/media/atomisp/pci/base/refcount/src/refcount.c
@@ -196,9 +196,7 @@ bool ia_css_refcount_decrement(s32 id, hrt_vaddress ptr)
id, ptr, entry, entry->id, entry->count);
else
IA_CSS_ERROR("entry NULL\n");
-#ifdef ISP2401
assert(false);
-#endif
return false;
}
@@ -246,14 +244,13 @@ void ia_css_refcount_clear(s32 id, clear_func clear_func_ptr)
"ia_css_refcount_clear: using hmm_free: no clear_func\n");
hmm_free(entry->data);
}
-#ifndef ISP2401
-#else
- assert(entry->count == 0);
-#endif
if (entry->count != 0) {
IA_CSS_WARNING("Ref count for entry %x is not zero!", entry->id);
}
+
+ assert(entry->count == 0);
+
entry->data = mmgr_NULL;
entry->count = 0;
entry->id = 0;