aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2014-05-12 19:41:46 -0400
committerBrian Norris <computersforpeace@gmail.com>2014-05-28 03:05:24 -0400
commit3a9f76bdf365efdc869125f9f2386643007f997b (patch)
treefc3301b513a7d8d431bb865494d0baf8f2ec9806
parented491d2063d41a09a35c7db1a99fea88dbfcd7aa (diff)
mtd: maps: sc520cdp: fix warnings
On m86k, and maybe a few other architectures, we get this kind of warning, due to misuse of volatile: drivers/mtd/maps/sc520cdp.c: In function 'sc520cdp_setup_par': >> drivers/mtd/maps/sc520cdp.c:223:2: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [enabled by default] arch/m68k/include/asm/raw_io.h:22:13: note: expected 'void *' but argument is of type 'volatile long unsigned int *' Rather than annotating the variable declaration, let's just use the proper accessors, which add the 'volatile' qualifier to the operation. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-rw-r--r--drivers/mtd/maps/sc520cdp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c
index 8fead8e46bce..093edd51bdc7 100644
--- a/drivers/mtd/maps/sc520cdp.c
+++ b/drivers/mtd/maps/sc520cdp.c
@@ -183,7 +183,7 @@ static const struct sc520_par_table par_table[NUM_FLASH_BANKS] =
183 183
184static void sc520cdp_setup_par(void) 184static void sc520cdp_setup_par(void)
185{ 185{
186 volatile unsigned long __iomem *mmcr; 186 unsigned long __iomem *mmcr;
187 unsigned long mmcr_val; 187 unsigned long mmcr_val;
188 int i, j; 188 int i, j;
189 189
@@ -203,11 +203,11 @@ static void sc520cdp_setup_par(void)
203 */ 203 */
204 for(i = 0; i < NUM_FLASH_BANKS; i++) { /* for each par_table entry */ 204 for(i = 0; i < NUM_FLASH_BANKS; i++) { /* for each par_table entry */
205 for(j = 0; j < NUM_SC520_PAR; j++) { /* for each PAR register */ 205 for(j = 0; j < NUM_SC520_PAR; j++) { /* for each PAR register */
206 mmcr_val = mmcr[SC520_PAR(j)]; 206 mmcr_val = readl(&mmcr[SC520_PAR(j)]);
207 /* if target device field matches, reprogram the PAR */ 207 /* if target device field matches, reprogram the PAR */
208 if((mmcr_val & SC520_PAR_TRGDEV) == par_table[i].trgdev) 208 if((mmcr_val & SC520_PAR_TRGDEV) == par_table[i].trgdev)
209 { 209 {
210 mmcr[SC520_PAR(j)] = par_table[i].new_par; 210 writel(par_table[i].new_par, &mmcr[SC520_PAR(j)]);
211 break; 211 break;
212 } 212 }
213 } 213 }