diff options
author | Lad, Prabhakar <prabhakar.lad@ti.com> | 2012-11-09 03:59:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-21 10:53:28 -0500 |
commit | baa29837a76d5738837602ff249a0c371591d7c7 (patch) | |
tree | f101d619b23134731782672b5b724b60152c5407 /drivers/media/platform | |
parent | 8c5dff905714446f8836b40a93bfeabd0aea8c82 (diff) |
[media] media: davinci: vpbe: fix build warning
Warnings were generated because of the following commit changed data type for
address pointer
195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors
add __iomem annotation to fix following warnings
drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’:
drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing
argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default]
arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile
void *’ but argument is of type ‘long unsigned int’
This patch stores the ioremap_nocache() returned address in a
void __iomem * instead of a unsigned long and passes the same to
readl/writel functions which fixes the above warnings.
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/davinci/vpbe_osd.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index bba299dbf396..707f243f810d 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c | |||
@@ -62,7 +62,7 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) | |||
62 | { | 62 | { |
63 | struct osd_state *osd = sd; | 63 | struct osd_state *osd = sd; |
64 | 64 | ||
65 | u32 addr = osd->osd_base + offset; | 65 | void __iomem *addr = osd->osd_base + offset; |
66 | u32 val = readl(addr) | mask; | 66 | u32 val = readl(addr) | mask; |
67 | 67 | ||
68 | writel(val, addr); | 68 | writel(val, addr); |
@@ -74,7 +74,7 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) | |||
74 | { | 74 | { |
75 | struct osd_state *osd = sd; | 75 | struct osd_state *osd = sd; |
76 | 76 | ||
77 | u32 addr = osd->osd_base + offset; | 77 | void __iomem *addr = osd->osd_base + offset; |
78 | u32 val = readl(addr) & ~mask; | 78 | u32 val = readl(addr) & ~mask; |
79 | 79 | ||
80 | writel(val, addr); | 80 | writel(val, addr); |
@@ -87,7 +87,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, | |||
87 | { | 87 | { |
88 | struct osd_state *osd = sd; | 88 | struct osd_state *osd = sd; |
89 | 89 | ||
90 | u32 addr = osd->osd_base + offset; | 90 | void __iomem *addr = osd->osd_base + offset; |
91 | u32 new_val = (readl(addr) & ~mask) | (val & mask); | 91 | u32 new_val = (readl(addr) & ~mask) | (val & mask); |
92 | 92 | ||
93 | writel(new_val, addr); | 93 | writel(new_val, addr); |
@@ -1559,8 +1559,7 @@ static int osd_probe(struct platform_device *pdev) | |||
1559 | ret = -ENODEV; | 1559 | ret = -ENODEV; |
1560 | goto free_mem; | 1560 | goto free_mem; |
1561 | } | 1561 | } |
1562 | osd->osd_base = (unsigned long)ioremap_nocache(res->start, | 1562 | osd->osd_base = ioremap_nocache(res->start, osd->osd_size); |
1563 | osd->osd_size); | ||
1564 | if (!osd->osd_base) { | 1563 | if (!osd->osd_base) { |
1565 | dev_err(osd->dev, "Unable to map the OSD region\n"); | 1564 | dev_err(osd->dev, "Unable to map the OSD region\n"); |
1566 | ret = -ENODEV; | 1565 | ret = -ENODEV; |