mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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: Stephen Boyd <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]> Cc: <[email protected]> Cc: David Howells <[email protected]> Cc: Hauke Mehrtens <[email protected]> Cc: Paul Walmsley <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a9aec5881b
commit
c431e67812
1 changed files with 4 additions and 9 deletions
|
|
@ -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.
|
||||
*/
|
||||
static void smd_copy_from_fifo(void *_dst,
|
||||
const void __iomem *_src,
|
||||
static void smd_copy_from_fifo(void *dst,
|
||||
const void __iomem *src,
|
||||
size_t count,
|
||||
bool word_aligned)
|
||||
{
|
||||
u32 *dst = (u32 *)_dst;
|
||||
u32 *src = (u32 *)_src;
|
||||
|
||||
if (word_aligned) {
|
||||
count /= sizeof(u32);
|
||||
while (count--)
|
||||
*dst++ = __raw_readl(src++);
|
||||
__ioread32_copy(dst, src, count / sizeof(u32));
|
||||
} else {
|
||||
memcpy_fromio(_dst, _src, count);
|
||||
memcpy_fromio(dst, src, count);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue