diff options
Diffstat (limited to 'drivers/mtd/maps/bast-flash.c')
-rw-r--r-- | drivers/mtd/maps/bast-flash.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mtd/maps/bast-flash.c b/drivers/mtd/maps/bast-flash.c index 5ec53c17e431..610dfcaa2c86 100644 --- a/drivers/mtd/maps/bast-flash.c +++ b/drivers/mtd/maps/bast-flash.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * 20-Sep-2004 BJD Initial version | 9 | * 20-Sep-2004 BJD Initial version |
10 | * 17-Jan-2005 BJD Add whole device if no partitions found | 10 | * 17-Jan-2005 BJD Add whole device if no partitions found |
11 | * | 11 | * |
12 | * $Id: bast-flash.c,v 1.3 2005/10/10 00:13:38 bjd Exp $ | 12 | * $Id: bast-flash.c,v 1.5 2005/11/07 11:14:26 gleixner Exp $ |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
15 | * it under the terms of the GNU General Public License as published by | 15 | * it under the terms of the GNU General Public License as published by |
@@ -75,7 +75,7 @@ static void bast_flash_setrw(int to) | |||
75 | 75 | ||
76 | local_irq_save(flags); | 76 | local_irq_save(flags); |
77 | val = __raw_readb(BAST_VA_CTRL3); | 77 | val = __raw_readb(BAST_VA_CTRL3); |
78 | 78 | ||
79 | if (to) | 79 | if (to) |
80 | val |= BAST_CPLD_CTRL3_ROMWEN; | 80 | val |= BAST_CPLD_CTRL3_ROMWEN; |
81 | else | 81 | else |
@@ -93,7 +93,7 @@ static int bast_flash_remove(struct device *dev) | |||
93 | 93 | ||
94 | dev_set_drvdata(dev, NULL); | 94 | dev_set_drvdata(dev, NULL); |
95 | 95 | ||
96 | if (info == NULL) | 96 | if (info == NULL) |
97 | return 0; | 97 | return 0; |
98 | 98 | ||
99 | if (info->map.virt != NULL) | 99 | if (info->map.virt != NULL) |
@@ -111,7 +111,7 @@ static int bast_flash_remove(struct device *dev) | |||
111 | release_resource(info->area); | 111 | release_resource(info->area); |
112 | kfree(info->area); | 112 | kfree(info->area); |
113 | } | 113 | } |
114 | 114 | ||
115 | kfree(info); | 115 | kfree(info); |
116 | 116 | ||
117 | return 0; | 117 | return 0; |
@@ -138,15 +138,15 @@ static int bast_flash_probe(struct device *dev) | |||
138 | 138 | ||
139 | info->map.phys = res->start; | 139 | info->map.phys = res->start; |
140 | info->map.size = res->end - res->start + 1; | 140 | info->map.size = res->end - res->start + 1; |
141 | info->map.name = dev->bus_id; | 141 | info->map.name = dev->bus_id; |
142 | info->map.bankwidth = 2; | 142 | info->map.bankwidth = 2; |
143 | 143 | ||
144 | if (info->map.size > AREA_MAXSIZE) | 144 | if (info->map.size > AREA_MAXSIZE) |
145 | info->map.size = AREA_MAXSIZE; | 145 | info->map.size = AREA_MAXSIZE; |
146 | 146 | ||
147 | pr_debug("%s: area %08lx, size %ld\n", __FUNCTION__, | 147 | pr_debug("%s: area %08lx, size %ld\n", __FUNCTION__, |
148 | info->map.phys, info->map.size); | 148 | info->map.phys, info->map.size); |
149 | 149 | ||
150 | info->area = request_mem_region(res->start, info->map.size, | 150 | info->area = request_mem_region(res->start, info->map.size, |
151 | pdev->name); | 151 | pdev->name); |
152 | if (info->area == NULL) { | 152 | if (info->area == NULL) { |
@@ -163,7 +163,7 @@ static int bast_flash_probe(struct device *dev) | |||
163 | err = -EIO; | 163 | err = -EIO; |
164 | goto exit_error; | 164 | goto exit_error; |
165 | } | 165 | } |
166 | 166 | ||
167 | simple_map_init(&info->map); | 167 | simple_map_init(&info->map); |
168 | 168 | ||
169 | /* enable the write to the flash area */ | 169 | /* enable the write to the flash area */ |
@@ -188,7 +188,7 @@ static int bast_flash_probe(struct device *dev) | |||
188 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); | 188 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); |
189 | if (err > 0) { | 189 | if (err > 0) { |
190 | err = add_mtd_partitions(info->mtd, info->partitions, err); | 190 | err = add_mtd_partitions(info->mtd, info->partitions, err); |
191 | if (err) | 191 | if (err) |
192 | printk(KERN_ERR PFX "cannot add/parse partitions\n"); | 192 | printk(KERN_ERR PFX "cannot add/parse partitions\n"); |
193 | } else { | 193 | } else { |
194 | err = add_mtd_device(info->mtd); | 194 | err = add_mtd_device(info->mtd); |