Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5a6ddaa authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

atomisp: kill off mmgr_free



This is just another wrapper layer around hmm_free that servers no purpose
in this driver.

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b83cc378
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ void atomisp_acc_release(struct atomisp_sub_device *asd)
	/* Free all mapped memory blocks */
	list_for_each_entry_safe(atomisp_map, tm, &asd->acc.memory_maps, list) {
		list_del(&atomisp_map->list);
		mmgr_free(atomisp_map->ptr);
		hmm_free(atomisp_map->ptr);
		kfree(atomisp_map);
	}
}
@@ -374,7 +374,7 @@ int atomisp_acc_map(struct atomisp_sub_device *asd, struct atomisp_acc_map *map)

	atomisp_map = kmalloc(sizeof(*atomisp_map), GFP_KERNEL);
	if (!atomisp_map) {
		mmgr_free(cssptr);
		hmm_free(cssptr);
		return -ENOMEM;
	}
	atomisp_map->ptr = cssptr;
@@ -399,7 +399,7 @@ int atomisp_acc_unmap(struct atomisp_sub_device *asd, struct atomisp_acc_map *ma
		return -EINVAL;

	list_del(&atomisp_map->list);
	mmgr_free(atomisp_map->ptr);
	hmm_free(atomisp_map->ptr);
	kfree(atomisp_map);
	return 0;
}
+4 −4
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ void ia_css_refcount_uninit(void)
			/*	ia_css_debug_dtrace(IA_CSS_DBG_TRACE,
				"ia_css_refcount_uninit: freeing (%x)\n",
				entry->data);*/
			mmgr_free(entry->data);
			hmm_free(entry->data);
			entry->data = mmgr_NULL;
			entry->count = 0;
			entry->id = 0;
@@ -181,7 +181,7 @@ bool ia_css_refcount_decrement(int32_t id, hrt_vaddress ptr)
			if (entry->count == 0) {
				/* ia_css_debug_dtrace(IA_CSS_DBEUG_TRACE,
				   "ia_css_refcount_decrement: freeing\n");*/
				mmgr_free(ptr);
				hmm_free(ptr);
				entry->data = mmgr_NULL;
				entry->id = 0;
			}
@@ -244,9 +244,9 @@ void ia_css_refcount_clear(int32_t id, clear_func clear_func_ptr)
			} else {
				ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
						    "ia_css_refcount_clear: "
						    "using mmgr_free: "
						    "using hmm_free: "
						    "no clear_func\n");
				mmgr_free(entry->data);
				hmm_free(entry->data);
			}
#ifndef ISP2401

+2 −8
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@
 */
#include "device_access.h"

#include "hmm/hmm.h"

/*!
 * \brief
 * Bit masks for specialised allocation functions
@@ -106,14 +108,6 @@ extern hrt_vaddress mmgr_malloc(const size_t size);
 */
extern hrt_vaddress mmgr_calloc(const size_t N, const size_t size);

/*! Free the memory allocation identified by the address

 \param	vaddr[in]		Address of the allocation

 \return vaddress
 */
extern void mmgr_free(hrt_vaddress vaddr);

/*! Return the address of an allocation in memory

 \param	size[in]		Size in bytes of the allocation
+0 −6
Original line number Diff line number Diff line
@@ -52,12 +52,6 @@ mmgr_calloc(const size_t N, const size_t size)
	return mmgr_alloc_attr(size * N, MMGR_ATTRIBUTE_CLEARED);
}

void
mmgr_free(hrt_vaddress vaddr)
{
	hmm_free(vaddr);
}

void
mmgr_clear(hrt_vaddress vaddr, const size_t size)
{
+1 −1
Original line number Diff line number Diff line
@@ -390,7 +390,7 @@ void
ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me)
{
	if (me != NULL) {
		mmgr_free(me->data_ptr);
		hmm_free(me->data_ptr);
		sh_css_free(me);
	}
}
Loading