diff options
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0020.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c index 0807c1c91e55..fae70a5db540 100644 --- a/drivers/mtd/chips/cfi_cmdset_0020.c +++ b/drivers/mtd/chips/cfi_cmdset_0020.c | |||
@@ -162,6 +162,7 @@ struct mtd_info *cfi_cmdset_0020(struct map_info *map, int primary) | |||
162 | 162 | ||
163 | return cfi_staa_setup(map); | 163 | return cfi_staa_setup(map); |
164 | } | 164 | } |
165 | EXPORT_SYMBOL_GPL(cfi_cmdset_0020); | ||
165 | 166 | ||
166 | static struct mtd_info *cfi_staa_setup(struct map_info *map) | 167 | static struct mtd_info *cfi_staa_setup(struct map_info *map) |
167 | { | 168 | { |
@@ -237,9 +238,8 @@ static struct mtd_info *cfi_staa_setup(struct map_info *map) | |||
237 | mtd->unlock = cfi_staa_unlock; | 238 | mtd->unlock = cfi_staa_unlock; |
238 | mtd->suspend = cfi_staa_suspend; | 239 | mtd->suspend = cfi_staa_suspend; |
239 | mtd->resume = cfi_staa_resume; | 240 | mtd->resume = cfi_staa_resume; |
240 | mtd->flags = MTD_CAP_NORFLASH; | 241 | mtd->flags = MTD_CAP_NORFLASH & ~MTD_BIT_WRITEABLE; |
241 | mtd->flags |= MTD_ECC; /* FIXME: Not all STMicro flashes have this */ | 242 | mtd->writesize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */ |
242 | mtd->eccsize = 8; /* FIXME: Should be 0 for STMicro flashes w/out ECC */ | ||
243 | map->fldrv = &cfi_staa_chipdrv; | 243 | map->fldrv = &cfi_staa_chipdrv; |
244 | __module_get(THIS_MODULE); | 244 | __module_get(THIS_MODULE); |
245 | mtd->name = map->name; | 245 | mtd->name = map->name; |
@@ -1410,20 +1410,4 @@ static void cfi_staa_destroy(struct mtd_info *mtd) | |||
1410 | kfree(cfi); | 1410 | kfree(cfi); |
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | static char im_name[]="cfi_cmdset_0020"; | ||
1414 | |||
1415 | static int __init cfi_staa_init(void) | ||
1416 | { | ||
1417 | inter_module_register(im_name, THIS_MODULE, &cfi_cmdset_0020); | ||
1418 | return 0; | ||
1419 | } | ||
1420 | |||
1421 | static void __exit cfi_staa_exit(void) | ||
1422 | { | ||
1423 | inter_module_unregister(im_name); | ||
1424 | } | ||
1425 | |||
1426 | module_init(cfi_staa_init); | ||
1427 | module_exit(cfi_staa_exit); | ||
1428 | |||
1429 | MODULE_LICENSE("GPL"); | 1413 | MODULE_LICENSE("GPL"); |