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

Commit 0d40ed6e authored by Chih-Wei Huang's avatar Chih-Wei Huang Committed by Greg Kroah-Hartman
Browse files

ANDROID: GKI: fix build error on 32bits due to ASoC msm change



Commit dbad92f6 ("ANDROID: GKI: ASoC: msm: fix integer overflow for
long duration offload playback") causes a link error if the kernel is
built for a 32bit target, like i386.

The error is::
	ERROR: "__umoddi3" [sound/soc/intel/atom/snd-soc-sst-atom-hifi2-platform.ko] undefined!
	kernel/scripts/Makefile.modpost:108: recipe for target '__modpost' failed

Fix this problem up by doing the division with the internal kernel
function to do so.

Bug: 153747771
Cc: Dhananjay Kumar <dhakumar@codeaurora.org>
Cc: Banajit Goswami <bgoswami@codeaurora.org>
Cc: Meng Wang <mwang@codeaurora.org>
Cc: Will McVicker <willmcvicker@google.com>
Fixes: dbad92f6 ("ANDROID: GKI: ASoC: msm: fix integer overflow for long duration offload playback")
Signed-off-by: default avatarChih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I339bc24c5531c2f0a14e5875728d349f837245f3
parent f20f1a9b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -214,8 +214,8 @@ static int sst_platform_compr_pointer(struct snd_compr_stream *cstream,

	stream  = cstream->runtime->private_data;
	stream->compr_ops->tstamp(sst->dev, stream->id, tstamp);
	tstamp->byte_offset = tstamp->copied_total %
				 (u32)cstream->runtime->buffer_size;
	div_u64_rem(tstamp->copied_total, (u32)cstream->runtime->buffer_size,
				 &tstamp->byte_offset);
	pr_debug("calc bytes offset/copied bytes as %d\n", tstamp->byte_offset);
	return 0;
}