提交 c431e678 编写于 作者: S Stephen Boyd 提交者: Linus Torvalds

drivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it

Now that we have a generic library function for this, replace the
open-coded instance.
Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
Reviewed-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: <zajec5@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a9aec588
...@@ -434,20 +434,15 @@ static void smd_copy_to_fifo(void __iomem *dst, ...@@ -434,20 +434,15 @@ static void smd_copy_to_fifo(void __iomem *dst,
/* /*
* Copy count bytes of data using 32bit accesses, if that is required. * Copy count bytes of data using 32bit accesses, if that is required.
*/ */
static void smd_copy_from_fifo(void *_dst, static void smd_copy_from_fifo(void *dst,
const void __iomem *_src, const void __iomem *src,
size_t count, size_t count,
bool word_aligned) bool word_aligned)
{ {
u32 *dst = (u32 *)_dst;
u32 *src = (u32 *)_src;
if (word_aligned) { if (word_aligned) {
count /= sizeof(u32); __ioread32_copy(dst, src, count / sizeof(u32));
while (count--)
*dst++ = __raw_readl(src++);
} else { } else {
memcpy_fromio(_dst, _src, count); memcpy_fromio(dst, src, count);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册