aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2015-10-18 13:57:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-18 22:00:36 -0400
commit525d12f27bb05c4255857849a8d28c0c086bd28e (patch)
treecaa130f6ce3f3b56aeec0da5df0cc0d2f09ba81b
parentd0eaa0c2fe9c1667a7ba8405c455d9627eac9540 (diff)
misc: sram: partition base address belongs to __iomem space
The change fixes a warning found by sparse: drivers/misc/sram.c:134:20: warning: incorrect type in assignment (different address spaces) drivers/misc/sram.c:134:20: expected void *base drivers/misc/sram.c:134:20: got void [noderef] <asn:2>* Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/sram.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index b0b5e9430bfe..736dae715dbf 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -29,7 +29,7 @@
29#define SRAM_GRANULARITY 32 29#define SRAM_GRANULARITY 32
30 30
31struct sram_partition { 31struct sram_partition {
32 void *base; 32 void __iomem *base;
33 33
34 struct gen_pool *pool; 34 struct gen_pool *pool;
35 struct bin_attribute battr; 35 struct bin_attribute battr;
@@ -65,7 +65,7 @@ static ssize_t sram_read(struct file *filp, struct kobject *kobj,
65 part = container_of(attr, struct sram_partition, battr); 65 part = container_of(attr, struct sram_partition, battr);
66 66
67 mutex_lock(&part->lock); 67 mutex_lock(&part->lock);
68 memcpy(buf, part->base + pos, count); 68 memcpy_fromio(buf, part->base + pos, count);
69 mutex_unlock(&part->lock); 69 mutex_unlock(&part->lock);
70 70
71 return count; 71 return count;
@@ -80,7 +80,7 @@ static ssize_t sram_write(struct file *filp, struct kobject *kobj,
80 part = container_of(attr, struct sram_partition, battr); 80 part = container_of(attr, struct sram_partition, battr);
81 81
82 mutex_lock(&part->lock); 82 mutex_lock(&part->lock);
83 memcpy(part->base + pos, buf, count); 83 memcpy_toio(part->base + pos, buf, count);
84 mutex_unlock(&part->lock); 84 mutex_unlock(&part->lock);
85 85
86 return count; 86 return count;