diff options
Diffstat (limited to 'arch/arm/plat-omap/iovmm.c')
-rw-r--r-- | arch/arm/plat-omap/iovmm.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c index 51ef43e8def..2a86fe51d7c 100644 --- a/arch/arm/plat-omap/iovmm.c +++ b/arch/arm/plat-omap/iovmm.c @@ -57,9 +57,7 @@ * * '*': not yet, but feasible. */ - static struct kmem_cache *iovm_area_cachep; - /* return total bytes of sg buffers */ static size_t sgtable_len(const struct sg_table *sgt) { @@ -275,7 +273,6 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, if (!obj || !bytes) return ERR_PTR(-EINVAL); - start = da; alignment = PAGE_SIZE; @@ -290,11 +287,9 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da, obj->da_end - start < bytes) { return ERR_PTR(-EINVAL); } - tmp = NULL; if (list_empty(&obj->mmap)) goto found; - prev_end = 0; list_for_each_entry(tmp, &obj->mmap, list) { @@ -459,7 +454,7 @@ static inline void sgtable_drain_kmalloc(struct sg_table *sgt) static int map_iovm_area(struct iommu *obj, struct iovm_struct *new, const struct sg_table *sgt, u32 flags) { - int err; + int err = 0; unsigned int i, j; struct scatterlist *sg; u32 da = new->da_start; @@ -884,7 +879,6 @@ void iommu_kfree(struct iommu *obj, u32 da) } EXPORT_SYMBOL_GPL(iommu_kfree); - static int __init iovmm_init(void) { const unsigned long flags = SLAB_HWCACHE_ALIGN; @@ -894,6 +888,7 @@ static int __init iovmm_init(void) flags, NULL); if (!p) return -ENOMEM; + iovm_area_cachep = p; return 0; |