diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-08-07 03:12:14 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 16:51:40 -0400 |
commit | d1d90c992da5b0b96cd6d3b2c0958b236808fb47 (patch) | |
tree | e44a0c9055ad4fe1dd47a72646154f8390b6388b | |
parent | 582b2ffcaa4bd2f39801d6ffe9d076a5c555952a (diff) |
mtd: impa7: add missing __iomem annotation
Added missing __iomem annotation and used NULL instead of 0
in order to fix the following sparse warnings:
drivers/mtd/maps/impa7.c:82:32: warning: Using plain integer as NULL pointer
drivers/mtd/maps/impa7.c:96:34: warning: cast removes address space of expression
drivers/mtd/maps/impa7.c:96:34: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/impa7.c:96:34: expected void volatile [noderef] <asn:2>*addr
drivers/mtd/maps/impa7.c:96:34: got void *<noident>
drivers/mtd/maps/impa7.c:108:34: warning: cast removes address space of expression
drivers/mtd/maps/impa7.c:108:34: warning: incorrect type in argument 1 (different address spaces)
drivers/mtd/maps/impa7.c:108:34: expected void volatile [noderef] <asn:2>*addr
drivers/mtd/maps/impa7.c:108:34: got void *<noident>
drivers/mtd/maps/impa7.c:109:45: warning: Using plain integer as NULL pointer
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r-- | drivers/mtd/maps/impa7.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c index 49686744d93c..15bbda03be65 100644 --- a/drivers/mtd/maps/impa7.c +++ b/drivers/mtd/maps/impa7.c | |||
@@ -79,7 +79,7 @@ static int __init init_impa7(void) | |||
79 | } | 79 | } |
80 | simple_map_init(&impa7_map[i]); | 80 | simple_map_init(&impa7_map[i]); |
81 | 81 | ||
82 | impa7_mtd[i] = 0; | 82 | impa7_mtd[i] = NULL; |
83 | type = rom_probe_types; | 83 | type = rom_probe_types; |
84 | for(; !impa7_mtd[i] && *type; type++) { | 84 | for(; !impa7_mtd[i] && *type; type++) { |
85 | impa7_mtd[i] = do_map_probe(*type, &impa7_map[i]); | 85 | impa7_mtd[i] = do_map_probe(*type, &impa7_map[i]); |
@@ -91,9 +91,9 @@ static int __init init_impa7(void) | |||
91 | mtd_device_parse_register(impa7_mtd[i], NULL, NULL, | 91 | mtd_device_parse_register(impa7_mtd[i], NULL, NULL, |
92 | partitions, | 92 | partitions, |
93 | ARRAY_SIZE(partitions)); | 93 | ARRAY_SIZE(partitions)); |
94 | } else { | ||
95 | iounmap((void __iomem *)impa7_map[i].virt); | ||
94 | } | 96 | } |
95 | else | ||
96 | iounmap((void *)impa7_map[i].virt); | ||
97 | } | 97 | } |
98 | return devicesfound == 0 ? -ENXIO : 0; | 98 | return devicesfound == 0 ? -ENXIO : 0; |
99 | } | 99 | } |
@@ -105,8 +105,8 @@ static void __exit cleanup_impa7(void) | |||
105 | if (impa7_mtd[i]) { | 105 | if (impa7_mtd[i]) { |
106 | mtd_device_unregister(impa7_mtd[i]); | 106 | mtd_device_unregister(impa7_mtd[i]); |
107 | map_destroy(impa7_mtd[i]); | 107 | map_destroy(impa7_mtd[i]); |
108 | iounmap((void *)impa7_map[i].virt); | 108 | iounmap((void __iomem *)impa7_map[i].virt); |
109 | impa7_map[i].virt = 0; | 109 | impa7_map[i].virt = NULL; |
110 | } | 110 | } |
111 | } | 111 | } |
112 | } | 112 | } |