diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2016-01-20 17:58:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 20:09:18 -0500 |
commit | c431e678127578c1b86fe976556d79dd669ad953 (patch) | |
tree | f26162ad38bdf2882e4fedd4851b40af8c3c0d7a /drivers/soc | |
parent | a9aec5881b9d4aca184b29d33484a6a58d23f7f2 (diff) |
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 <sboyd@codeaurora.org>
Reviewed-by: Bjorn 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/smd.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/soc/qcom/smd.c b/drivers/soc/qcom/smd.c index 86b598cff91a..498fd0581a45 100644 --- a/drivers/soc/qcom/smd.c +++ b/drivers/soc/qcom/smd.c | |||
@@ -434,20 +434,15 @@ static void smd_copy_to_fifo(void __iomem *dst, | |||
434 | /* | 434 | /* |
435 | * Copy count bytes of data using 32bit accesses, if that is required. | 435 | * Copy count bytes of data using 32bit accesses, if that is required. |
436 | */ | 436 | */ |
437 | static void smd_copy_from_fifo(void *_dst, | 437 | static void smd_copy_from_fifo(void *dst, |
438 | const void __iomem *_src, | 438 | const void __iomem *src, |
439 | size_t count, | 439 | size_t count, |
440 | bool word_aligned) | 440 | bool word_aligned) |
441 | { | 441 | { |
442 | u32 *dst = (u32 *)_dst; | ||
443 | u32 *src = (u32 *)_src; | ||
444 | |||
445 | if (word_aligned) { | 442 | if (word_aligned) { |
446 | count /= sizeof(u32); | 443 | __ioread32_copy(dst, src, count / sizeof(u32)); |
447 | while (count--) | ||
448 | *dst++ = __raw_readl(src++); | ||
449 | } else { | 444 | } else { |
450 | memcpy_fromio(_dst, _src, count); | 445 | memcpy_fromio(dst, src, count); |
451 | } | 446 | } |
452 | } | 447 | } |
453 | 448 | ||