At least one map_dma() implementation (EXYNOS_CONTIG) assumes the fields
are filled in
Change-Id: I88c84dc5663df41f9aa9401b5f80fc2570f9dd95
Signed-off-by: Greg Hackmann <ghackmann@google.com>
return ERR_PTR(ret);
}
+ buffer->dev = dev;
+ buffer->size = len;
+
table = buffer->heap->ops->map_dma(buffer->heap, buffer);
if (IS_ERR_OR_NULL(table)) {
heap->ops->free(buffer);
}
buffer->sg_table = table;
- buffer->dev = dev;
- buffer->size = len;
mutex_init(&buffer->lock);
ion_buffer_add(dev, buffer);
return buffer;