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

Commit c2a39c5b authored by Larry Bassel's avatar Larry Bassel
Browse files

ion: do not use sg_dma_len() macro



Use of sg_dma_len() is not portable to 64 bit and is not used any more
by ion or iommu. Replace the usages by direct access of the length
structure member.

Change-Id: I6c18b2a77e288be312448c36f8ed3ad6db90ac0f
Signed-off-by: default avatarLarry Bassel <lbassel@codeaurora.org>
parent a888b526
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -208,8 +208,8 @@ static int ion_iommu_map_iommu(struct ion_iommu_meta *meta,
	 * biggest entry. To take advantage of bigger mapping sizes both the
	 * VA and PA addresses have to be aligned to the biggest size.
	 */
	if (sg_dma_len(table->sgl) > align)
		align = sg_dma_len(table->sgl);
	if (table->sgl->length > align)
		align = table->sgl->length;

	ret = msm_allocate_iova_address(domain_num, partition_num,
						data->mapped_size, align,
@@ -394,7 +394,7 @@ int ion_map_iommu(struct ion_client *client, struct ion_handle *handle,
		return PTR_ERR(table);

	for_each_sg(table->sgl, sg, table->nents, i)
		size += sg_dma_len(sg);
		size += sg->length;

	if (!msm_use_iommu()) {
		unsigned long pa = sg_dma_address(table->sgl);