ASoC: intel: use __iowrite32_copy for 32 bit copy
authorVinod Koul <vinod.koul@intel.com>
Mon, 20 Oct 2014 15:24:30 +0000 (20:54 +0530)
committerMark Brown <broonie@kernel.org>
Tue, 21 Oct 2014 22:58:59 +0000 (23:58 +0100)
The driver was using own method to do 32bit copy, turns out we have a kernel
API so use that instead

Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/sst/sst_loader.c

index b6d27c14455a8181f92e6b4507b350a984fe89be..00f60c1e9fdac7351f19e8eab23a79fbb9c21315 100644 (file)
 #include "sst.h"
 #include "../sst-dsp.h"
 
-static void memcpy32_toio(void __iomem *dst, const void *src, int count)
+static inline void memcpy32_toio(void __iomem *dst, const void *src, int count)
 {
-       int i;
-       const u32 *src_32 = src;
-       u32 *dst_32 = dst;
-
-       for (i = 0; i < count/sizeof(u32); i++)
-               writel(*src_32++, dst_32++);
+       /* __iowrite32_copy uses 32-bit count values so divide by 4 for
+        * right count in words
+        */
+       __iowrite32_copy(dst, src, count/4);
 }
 
 /**
This page took 0.030363 seconds and 5 git commands to generate.