diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0001.c | 43 | ||||
-rw-r--r-- | drivers/mtd/chips/jedec_probe.c | 35 | ||||
-rw-r--r-- | drivers/mtd/maps/amd76xrom.c | 1 | ||||
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 15 | ||||
-rw-r--r-- | drivers/mtd/maps/sun_uflash.c | 8 | ||||
-rw-r--r-- | drivers/mtd/mtd_blkdevs.c | 1 | ||||
-rw-r--r-- | drivers/mtd/nand/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/fsl_upm.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/mpc5121_nfc.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/ndfc.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/omap2.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/pasemi_nand.c | 9 | ||||
-rw-r--r-- | drivers/mtd/nand/socrates_nand.c | 9 | ||||
-rw-r--r-- | drivers/mtd/onenand/Kconfig | 2 | ||||
-rw-r--r-- | drivers/mtd/onenand/generic.c | 2 | ||||
-rw-r--r-- | drivers/mtd/onenand/omap2.c | 2 |
16 files changed, 79 insertions, 79 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index a8c3e1c9b02a..4aaa88f8ab5f 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c | |||
@@ -1230,10 +1230,32 @@ static int inval_cache_and_wait_for_operation( | |||
1230 | sleep_time = chip_op_time / 2; | 1230 | sleep_time = chip_op_time / 2; |
1231 | 1231 | ||
1232 | for (;;) { | 1232 | for (;;) { |
1233 | if (chip->state != chip_state) { | ||
1234 | /* Someone's suspended the operation: sleep */ | ||
1235 | DECLARE_WAITQUEUE(wait, current); | ||
1236 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
1237 | add_wait_queue(&chip->wq, &wait); | ||
1238 | mutex_unlock(&chip->mutex); | ||
1239 | schedule(); | ||
1240 | remove_wait_queue(&chip->wq, &wait); | ||
1241 | mutex_lock(&chip->mutex); | ||
1242 | continue; | ||
1243 | } | ||
1244 | |||
1233 | status = map_read(map, cmd_adr); | 1245 | status = map_read(map, cmd_adr); |
1234 | if (map_word_andequal(map, status, status_OK, status_OK)) | 1246 | if (map_word_andequal(map, status, status_OK, status_OK)) |
1235 | break; | 1247 | break; |
1236 | 1248 | ||
1249 | if (chip->erase_suspended && chip_state == FL_ERASING) { | ||
1250 | /* Erase suspend occured while sleep: reset timeout */ | ||
1251 | timeo = reset_timeo; | ||
1252 | chip->erase_suspended = 0; | ||
1253 | } | ||
1254 | if (chip->write_suspended && chip_state == FL_WRITING) { | ||
1255 | /* Write suspend occured while sleep: reset timeout */ | ||
1256 | timeo = reset_timeo; | ||
1257 | chip->write_suspended = 0; | ||
1258 | } | ||
1237 | if (!timeo) { | 1259 | if (!timeo) { |
1238 | map_write(map, CMD(0x70), cmd_adr); | 1260 | map_write(map, CMD(0x70), cmd_adr); |
1239 | chip->state = FL_STATUS; | 1261 | chip->state = FL_STATUS; |
@@ -1257,27 +1279,6 @@ static int inval_cache_and_wait_for_operation( | |||
1257 | timeo--; | 1279 | timeo--; |
1258 | } | 1280 | } |
1259 | mutex_lock(&chip->mutex); | 1281 | mutex_lock(&chip->mutex); |
1260 | |||
1261 | while (chip->state != chip_state) { | ||
1262 | /* Someone's suspended the operation: sleep */ | ||
1263 | DECLARE_WAITQUEUE(wait, current); | ||
1264 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
1265 | add_wait_queue(&chip->wq, &wait); | ||
1266 | mutex_unlock(&chip->mutex); | ||
1267 | schedule(); | ||
1268 | remove_wait_queue(&chip->wq, &wait); | ||
1269 | mutex_lock(&chip->mutex); | ||
1270 | } | ||
1271 | if (chip->erase_suspended && chip_state == FL_ERASING) { | ||
1272 | /* Erase suspend occured while sleep: reset timeout */ | ||
1273 | timeo = reset_timeo; | ||
1274 | chip->erase_suspended = 0; | ||
1275 | } | ||
1276 | if (chip->write_suspended && chip_state == FL_WRITING) { | ||
1277 | /* Write suspend occured while sleep: reset timeout */ | ||
1278 | timeo = reset_timeo; | ||
1279 | chip->write_suspended = 0; | ||
1280 | } | ||
1281 | } | 1282 | } |
1282 | 1283 | ||
1283 | /* Done and happy. */ | 1284 | /* Done and happy. */ |
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c index d72a5fb2d041..4e1be51cc122 100644 --- a/drivers/mtd/chips/jedec_probe.c +++ b/drivers/mtd/chips/jedec_probe.c | |||
@@ -1935,14 +1935,14 @@ static void jedec_reset(u32 base, struct map_info *map, struct cfi_private *cfi) | |||
1935 | } | 1935 | } |
1936 | 1936 | ||
1937 | 1937 | ||
1938 | static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) | 1938 | static int cfi_jedec_setup(struct map_info *map, struct cfi_private *cfi, int index) |
1939 | { | 1939 | { |
1940 | int i,num_erase_regions; | 1940 | int i,num_erase_regions; |
1941 | uint8_t uaddr; | 1941 | uint8_t uaddr; |
1942 | 1942 | ||
1943 | if (! (jedec_table[index].devtypes & p_cfi->device_type)) { | 1943 | if (!(jedec_table[index].devtypes & cfi->device_type)) { |
1944 | DEBUG(MTD_DEBUG_LEVEL1, "Rejecting potential %s with incompatible %d-bit device type\n", | 1944 | DEBUG(MTD_DEBUG_LEVEL1, "Rejecting potential %s with incompatible %d-bit device type\n", |
1945 | jedec_table[index].name, 4 * (1<<p_cfi->device_type)); | 1945 | jedec_table[index].name, 4 * (1<<cfi->device_type)); |
1946 | return 0; | 1946 | return 0; |
1947 | } | 1947 | } |
1948 | 1948 | ||
@@ -1950,27 +1950,28 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) | |||
1950 | 1950 | ||
1951 | num_erase_regions = jedec_table[index].nr_regions; | 1951 | num_erase_regions = jedec_table[index].nr_regions; |
1952 | 1952 | ||
1953 | p_cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); | 1953 | cfi->cfiq = kmalloc(sizeof(struct cfi_ident) + num_erase_regions * 4, GFP_KERNEL); |
1954 | if (!p_cfi->cfiq) { | 1954 | if (!cfi->cfiq) { |
1955 | //xx printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name); | 1955 | //xx printk(KERN_WARNING "%s: kmalloc failed for CFI ident structure\n", map->name); |
1956 | return 0; | 1956 | return 0; |
1957 | } | 1957 | } |
1958 | 1958 | ||
1959 | memset(p_cfi->cfiq,0,sizeof(struct cfi_ident)); | 1959 | memset(cfi->cfiq, 0, sizeof(struct cfi_ident)); |
1960 | 1960 | ||
1961 | p_cfi->cfiq->P_ID = jedec_table[index].cmd_set; | 1961 | cfi->cfiq->P_ID = jedec_table[index].cmd_set; |
1962 | p_cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions; | 1962 | cfi->cfiq->NumEraseRegions = jedec_table[index].nr_regions; |
1963 | p_cfi->cfiq->DevSize = jedec_table[index].dev_size; | 1963 | cfi->cfiq->DevSize = jedec_table[index].dev_size; |
1964 | p_cfi->cfi_mode = CFI_MODE_JEDEC; | 1964 | cfi->cfi_mode = CFI_MODE_JEDEC; |
1965 | cfi->sector_erase_cmd = CMD(0x30); | ||
1965 | 1966 | ||
1966 | for (i=0; i<num_erase_regions; i++){ | 1967 | for (i=0; i<num_erase_regions; i++){ |
1967 | p_cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i]; | 1968 | cfi->cfiq->EraseRegionInfo[i] = jedec_table[index].regions[i]; |
1968 | } | 1969 | } |
1969 | p_cfi->cmdset_priv = NULL; | 1970 | cfi->cmdset_priv = NULL; |
1970 | 1971 | ||
1971 | /* This may be redundant for some cases, but it doesn't hurt */ | 1972 | /* This may be redundant for some cases, but it doesn't hurt */ |
1972 | p_cfi->mfr = jedec_table[index].mfr_id; | 1973 | cfi->mfr = jedec_table[index].mfr_id; |
1973 | p_cfi->id = jedec_table[index].dev_id; | 1974 | cfi->id = jedec_table[index].dev_id; |
1974 | 1975 | ||
1975 | uaddr = jedec_table[index].uaddr; | 1976 | uaddr = jedec_table[index].uaddr; |
1976 | 1977 | ||
@@ -1978,8 +1979,8 @@ static int cfi_jedec_setup(struct cfi_private *p_cfi, int index) | |||
1978 | our brains explode when we see the datasheets talking about address | 1979 | our brains explode when we see the datasheets talking about address |
1979 | lines numbered from A-1 to A18. The CFI table has unlock addresses | 1980 | lines numbered from A-1 to A18. The CFI table has unlock addresses |
1980 | in device-words according to the mode the device is connected in */ | 1981 | in device-words according to the mode the device is connected in */ |
1981 | p_cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / p_cfi->device_type; | 1982 | cfi->addr_unlock1 = unlock_addrs[uaddr].addr1 / cfi->device_type; |
1982 | p_cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / p_cfi->device_type; | 1983 | cfi->addr_unlock2 = unlock_addrs[uaddr].addr2 / cfi->device_type; |
1983 | 1984 | ||
1984 | return 1; /* ok */ | 1985 | return 1; /* ok */ |
1985 | } | 1986 | } |
@@ -2175,7 +2176,7 @@ static int jedec_probe_chip(struct map_info *map, __u32 base, | |||
2175 | "MTD %s(): matched device 0x%x,0x%x unlock_addrs: 0x%.4x 0x%.4x\n", | 2176 | "MTD %s(): matched device 0x%x,0x%x unlock_addrs: 0x%.4x 0x%.4x\n", |
2176 | __func__, cfi->mfr, cfi->id, | 2177 | __func__, cfi->mfr, cfi->id, |
2177 | cfi->addr_unlock1, cfi->addr_unlock2 ); | 2178 | cfi->addr_unlock1, cfi->addr_unlock2 ); |
2178 | if (!cfi_jedec_setup(cfi, i)) | 2179 | if (!cfi_jedec_setup(map, cfi, i)) |
2179 | return 0; | 2180 | return 0; |
2180 | goto ok_out; | 2181 | goto ok_out; |
2181 | } | 2182 | } |
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index 77d64ce19e9f..92de7e3a49a5 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c | |||
@@ -151,6 +151,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, | |||
151 | printk(KERN_ERR MOD_NAME | 151 | printk(KERN_ERR MOD_NAME |
152 | " %s(): Unable to register resource %pR - kernel bug?\n", | 152 | " %s(): Unable to register resource %pR - kernel bug?\n", |
153 | __func__, &window->rsrc); | 153 | __func__, &window->rsrc); |
154 | return -EBUSY; | ||
154 | } | 155 | } |
155 | 156 | ||
156 | 157 | ||
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 8506578e6a35..3db0cb083d31 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -216,8 +216,7 @@ static void __devinit of_free_probes(const char **probes) | |||
216 | } | 216 | } |
217 | #endif | 217 | #endif |
218 | 218 | ||
219 | static int __devinit of_flash_probe(struct platform_device *dev, | 219 | static int __devinit of_flash_probe(struct platform_device *dev) |
220 | const struct of_device_id *match) | ||
221 | { | 220 | { |
222 | #ifdef CONFIG_MTD_PARTITIONS | 221 | #ifdef CONFIG_MTD_PARTITIONS |
223 | const char **part_probe_types; | 222 | const char **part_probe_types; |
@@ -225,7 +224,7 @@ static int __devinit of_flash_probe(struct platform_device *dev, | |||
225 | struct device_node *dp = dev->dev.of_node; | 224 | struct device_node *dp = dev->dev.of_node; |
226 | struct resource res; | 225 | struct resource res; |
227 | struct of_flash *info; | 226 | struct of_flash *info; |
228 | const char *probe_type = match->data; | 227 | const char *probe_type; |
229 | const __be32 *width; | 228 | const __be32 *width; |
230 | int err; | 229 | int err; |
231 | int i; | 230 | int i; |
@@ -235,6 +234,10 @@ static int __devinit of_flash_probe(struct platform_device *dev, | |||
235 | struct mtd_info **mtd_list = NULL; | 234 | struct mtd_info **mtd_list = NULL; |
236 | resource_size_t res_size; | 235 | resource_size_t res_size; |
237 | 236 | ||
237 | if (!dev->dev.of_match) | ||
238 | return -EINVAL; | ||
239 | probe_type = dev->dev.of_match->data; | ||
240 | |||
238 | reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); | 241 | reg_tuple_size = (of_n_addr_cells(dp) + of_n_size_cells(dp)) * sizeof(u32); |
239 | 242 | ||
240 | /* | 243 | /* |
@@ -418,7 +421,7 @@ static struct of_device_id of_flash_match[] = { | |||
418 | }; | 421 | }; |
419 | MODULE_DEVICE_TABLE(of, of_flash_match); | 422 | MODULE_DEVICE_TABLE(of, of_flash_match); |
420 | 423 | ||
421 | static struct of_platform_driver of_flash_driver = { | 424 | static struct platform_driver of_flash_driver = { |
422 | .driver = { | 425 | .driver = { |
423 | .name = "of-flash", | 426 | .name = "of-flash", |
424 | .owner = THIS_MODULE, | 427 | .owner = THIS_MODULE, |
@@ -430,12 +433,12 @@ static struct of_platform_driver of_flash_driver = { | |||
430 | 433 | ||
431 | static int __init of_flash_init(void) | 434 | static int __init of_flash_init(void) |
432 | { | 435 | { |
433 | return of_register_platform_driver(&of_flash_driver); | 436 | return platform_driver_register(&of_flash_driver); |
434 | } | 437 | } |
435 | 438 | ||
436 | static void __exit of_flash_exit(void) | 439 | static void __exit of_flash_exit(void) |
437 | { | 440 | { |
438 | of_unregister_platform_driver(&of_flash_driver); | 441 | platform_driver_unregister(&of_flash_driver); |
439 | } | 442 | } |
440 | 443 | ||
441 | module_init(of_flash_init); | 444 | module_init(of_flash_init); |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index 3582ba1f9b09..3f1cb328a574 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
@@ -108,7 +108,7 @@ int uflash_devinit(struct platform_device *op, struct device_node *dp) | |||
108 | return 0; | 108 | return 0; |
109 | } | 109 | } |
110 | 110 | ||
111 | static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match) | 111 | static int __devinit uflash_probe(struct platform_device *op) |
112 | { | 112 | { |
113 | struct device_node *dp = op->dev.of_node; | 113 | struct device_node *dp = op->dev.of_node; |
114 | 114 | ||
@@ -148,7 +148,7 @@ static const struct of_device_id uflash_match[] = { | |||
148 | 148 | ||
149 | MODULE_DEVICE_TABLE(of, uflash_match); | 149 | MODULE_DEVICE_TABLE(of, uflash_match); |
150 | 150 | ||
151 | static struct of_platform_driver uflash_driver = { | 151 | static struct platform_driver uflash_driver = { |
152 | .driver = { | 152 | .driver = { |
153 | .name = DRIVER_NAME, | 153 | .name = DRIVER_NAME, |
154 | .owner = THIS_MODULE, | 154 | .owner = THIS_MODULE, |
@@ -160,12 +160,12 @@ static struct of_platform_driver uflash_driver = { | |||
160 | 160 | ||
161 | static int __init uflash_init(void) | 161 | static int __init uflash_init(void) |
162 | { | 162 | { |
163 | return of_register_platform_driver(&uflash_driver); | 163 | return platform_driver_register(&uflash_driver); |
164 | } | 164 | } |
165 | 165 | ||
166 | static void __exit uflash_exit(void) | 166 | static void __exit uflash_exit(void) |
167 | { | 167 | { |
168 | of_unregister_platform_driver(&uflash_driver); | 168 | platform_driver_unregister(&uflash_driver); |
169 | } | 169 | } |
170 | 170 | ||
171 | module_init(uflash_init); | 171 | module_init(uflash_init); |
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c index cb20c67995d8..e0a2373bf0e2 100644 --- a/drivers/mtd/mtd_blkdevs.c +++ b/drivers/mtd/mtd_blkdevs.c | |||
@@ -413,7 +413,6 @@ error3: | |||
413 | error2: | 413 | error2: |
414 | list_del(&new->list); | 414 | list_del(&new->list); |
415 | error1: | 415 | error1: |
416 | kfree(new); | ||
417 | return ret; | 416 | return ret; |
418 | } | 417 | } |
419 | 418 | ||
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 178e2006063d..4f6c06f16328 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -459,7 +459,7 @@ config MTD_NAND_MPC5121_NFC | |||
459 | 459 | ||
460 | config MTD_NAND_MXC | 460 | config MTD_NAND_MXC |
461 | tristate "MXC NAND support" | 461 | tristate "MXC NAND support" |
462 | depends on ARCH_MX2 || ARCH_MX25 || ARCH_MX3 || ARCH_MX51 | 462 | depends on IMX_HAVE_PLATFORM_MXC_NAND |
463 | help | 463 | help |
464 | This enables the driver for the NAND flash controller on the | 464 | This enables the driver for the NAND flash controller on the |
465 | MXC processors. | 465 | MXC processors. |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index efdcca94ce55..073ee026a17c 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
@@ -217,8 +217,7 @@ err: | |||
217 | return ret; | 217 | return ret; |
218 | } | 218 | } |
219 | 219 | ||
220 | static int __devinit fun_probe(struct platform_device *ofdev, | 220 | static int __devinit fun_probe(struct platform_device *ofdev) |
221 | const struct of_device_id *ofid) | ||
222 | { | 221 | { |
223 | struct fsl_upm_nand *fun; | 222 | struct fsl_upm_nand *fun; |
224 | struct resource io_res; | 223 | struct resource io_res; |
@@ -360,7 +359,7 @@ static const struct of_device_id of_fun_match[] = { | |||
360 | }; | 359 | }; |
361 | MODULE_DEVICE_TABLE(of, of_fun_match); | 360 | MODULE_DEVICE_TABLE(of, of_fun_match); |
362 | 361 | ||
363 | static struct of_platform_driver of_fun_driver = { | 362 | static struct platform_driver of_fun_driver = { |
364 | .driver = { | 363 | .driver = { |
365 | .name = "fsl,upm-nand", | 364 | .name = "fsl,upm-nand", |
366 | .owner = THIS_MODULE, | 365 | .owner = THIS_MODULE, |
@@ -372,13 +371,13 @@ static struct of_platform_driver of_fun_driver = { | |||
372 | 371 | ||
373 | static int __init fun_module_init(void) | 372 | static int __init fun_module_init(void) |
374 | { | 373 | { |
375 | return of_register_platform_driver(&of_fun_driver); | 374 | return platform_driver_register(&of_fun_driver); |
376 | } | 375 | } |
377 | module_init(fun_module_init); | 376 | module_init(fun_module_init); |
378 | 377 | ||
379 | static void __exit fun_module_exit(void) | 378 | static void __exit fun_module_exit(void) |
380 | { | 379 | { |
381 | of_unregister_platform_driver(&of_fun_driver); | 380 | platform_driver_unregister(&of_fun_driver); |
382 | } | 381 | } |
383 | module_exit(fun_module_exit); | 382 | module_exit(fun_module_exit); |
384 | 383 | ||
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 469e649c911c..c2f95437e5e9 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c | |||
@@ -650,8 +650,7 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd) | |||
650 | iounmap(prv->csreg); | 650 | iounmap(prv->csreg); |
651 | } | 651 | } |
652 | 652 | ||
653 | static int __devinit mpc5121_nfc_probe(struct platform_device *op, | 653 | static int __devinit mpc5121_nfc_probe(struct platform_device *op) |
654 | const struct of_device_id *match) | ||
655 | { | 654 | { |
656 | struct device_node *rootnode, *dn = op->dev.of_node; | 655 | struct device_node *rootnode, *dn = op->dev.of_node; |
657 | struct device *dev = &op->dev; | 656 | struct device *dev = &op->dev; |
@@ -891,7 +890,7 @@ static struct of_device_id mpc5121_nfc_match[] __devinitdata = { | |||
891 | {}, | 890 | {}, |
892 | }; | 891 | }; |
893 | 892 | ||
894 | static struct of_platform_driver mpc5121_nfc_driver = { | 893 | static struct platform_driver mpc5121_nfc_driver = { |
895 | .probe = mpc5121_nfc_probe, | 894 | .probe = mpc5121_nfc_probe, |
896 | .remove = __devexit_p(mpc5121_nfc_remove), | 895 | .remove = __devexit_p(mpc5121_nfc_remove), |
897 | .driver = { | 896 | .driver = { |
@@ -903,14 +902,14 @@ static struct of_platform_driver mpc5121_nfc_driver = { | |||
903 | 902 | ||
904 | static int __init mpc5121_nfc_init(void) | 903 | static int __init mpc5121_nfc_init(void) |
905 | { | 904 | { |
906 | return of_register_platform_driver(&mpc5121_nfc_driver); | 905 | return platform_driver_register(&mpc5121_nfc_driver); |
907 | } | 906 | } |
908 | 907 | ||
909 | module_init(mpc5121_nfc_init); | 908 | module_init(mpc5121_nfc_init); |
910 | 909 | ||
911 | static void __exit mpc5121_nfc_cleanup(void) | 910 | static void __exit mpc5121_nfc_cleanup(void) |
912 | { | 911 | { |
913 | of_unregister_platform_driver(&mpc5121_nfc_driver); | 912 | platform_driver_unregister(&mpc5121_nfc_driver); |
914 | } | 913 | } |
915 | 914 | ||
916 | module_exit(mpc5121_nfc_cleanup); | 915 | module_exit(mpc5121_nfc_cleanup); |
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index c9ae0a5023b6..bbe6d451290d 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -225,8 +225,7 @@ err: | |||
225 | return ret; | 225 | return ret; |
226 | } | 226 | } |
227 | 227 | ||
228 | static int __devinit ndfc_probe(struct platform_device *ofdev, | 228 | static int __devinit ndfc_probe(struct platform_device *ofdev) |
229 | const struct of_device_id *match) | ||
230 | { | 229 | { |
231 | struct ndfc_controller *ndfc = &ndfc_ctrl; | 230 | struct ndfc_controller *ndfc = &ndfc_ctrl; |
232 | const __be32 *reg; | 231 | const __be32 *reg; |
@@ -292,7 +291,7 @@ static const struct of_device_id ndfc_match[] = { | |||
292 | }; | 291 | }; |
293 | MODULE_DEVICE_TABLE(of, ndfc_match); | 292 | MODULE_DEVICE_TABLE(of, ndfc_match); |
294 | 293 | ||
295 | static struct of_platform_driver ndfc_driver = { | 294 | static struct platform_driver ndfc_driver = { |
296 | .driver = { | 295 | .driver = { |
297 | .name = "ndfc", | 296 | .name = "ndfc", |
298 | .owner = THIS_MODULE, | 297 | .owner = THIS_MODULE, |
@@ -304,12 +303,12 @@ static struct of_platform_driver ndfc_driver = { | |||
304 | 303 | ||
305 | static int __init ndfc_nand_init(void) | 304 | static int __init ndfc_nand_init(void) |
306 | { | 305 | { |
307 | return of_register_platform_driver(&ndfc_driver); | 306 | return platform_driver_register(&ndfc_driver); |
308 | } | 307 | } |
309 | 308 | ||
310 | static void __exit ndfc_nand_exit(void) | 309 | static void __exit ndfc_nand_exit(void) |
311 | { | 310 | { |
312 | of_unregister_platform_driver(&ndfc_driver); | 311 | platform_driver_unregister(&ndfc_driver); |
313 | } | 312 | } |
314 | 313 | ||
315 | module_init(ndfc_nand_init); | 314 | module_init(ndfc_nand_init); |
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index 4e33972ad17a..7b8f1fffc528 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
@@ -1159,6 +1159,6 @@ static void __exit omap_nand_exit(void) | |||
1159 | module_init(omap_nand_init); | 1159 | module_init(omap_nand_init); |
1160 | module_exit(omap_nand_exit); | 1160 | module_exit(omap_nand_exit); |
1161 | 1161 | ||
1162 | MODULE_ALIAS(DRIVER_NAME); | 1162 | MODULE_ALIAS("platform:" DRIVER_NAME); |
1163 | MODULE_LICENSE("GPL"); | 1163 | MODULE_LICENSE("GPL"); |
1164 | MODULE_DESCRIPTION("Glue layer for NAND flash on TI OMAP boards"); | 1164 | MODULE_DESCRIPTION("Glue layer for NAND flash on TI OMAP boards"); |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index bb277a54986f..59efa829ef24 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
@@ -89,8 +89,7 @@ int pasemi_device_ready(struct mtd_info *mtd) | |||
89 | return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); | 89 | return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); |
90 | } | 90 | } |
91 | 91 | ||
92 | static int __devinit pasemi_nand_probe(struct platform_device *ofdev, | 92 | static int __devinit pasemi_nand_probe(struct platform_device *ofdev) |
93 | const struct of_device_id *match) | ||
94 | { | 93 | { |
95 | struct pci_dev *pdev; | 94 | struct pci_dev *pdev; |
96 | struct device_node *np = ofdev->dev.of_node; | 95 | struct device_node *np = ofdev->dev.of_node; |
@@ -219,7 +218,7 @@ static const struct of_device_id pasemi_nand_match[] = | |||
219 | 218 | ||
220 | MODULE_DEVICE_TABLE(of, pasemi_nand_match); | 219 | MODULE_DEVICE_TABLE(of, pasemi_nand_match); |
221 | 220 | ||
222 | static struct of_platform_driver pasemi_nand_driver = | 221 | static struct platform_driver pasemi_nand_driver = |
223 | { | 222 | { |
224 | .driver = { | 223 | .driver = { |
225 | .name = (char*)driver_name, | 224 | .name = (char*)driver_name, |
@@ -232,13 +231,13 @@ static struct of_platform_driver pasemi_nand_driver = | |||
232 | 231 | ||
233 | static int __init pasemi_nand_init(void) | 232 | static int __init pasemi_nand_init(void) |
234 | { | 233 | { |
235 | return of_register_platform_driver(&pasemi_nand_driver); | 234 | return platform_driver_register(&pasemi_nand_driver); |
236 | } | 235 | } |
237 | module_init(pasemi_nand_init); | 236 | module_init(pasemi_nand_init); |
238 | 237 | ||
239 | static void __exit pasemi_nand_exit(void) | 238 | static void __exit pasemi_nand_exit(void) |
240 | { | 239 | { |
241 | of_unregister_platform_driver(&pasemi_nand_driver); | 240 | platform_driver_unregister(&pasemi_nand_driver); |
242 | } | 241 | } |
243 | module_exit(pasemi_nand_exit); | 242 | module_exit(pasemi_nand_exit); |
244 | 243 | ||
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index a8e403eebedb..a853548986f0 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c | |||
@@ -162,8 +162,7 @@ static const char *part_probes[] = { "cmdlinepart", NULL }; | |||
162 | /* | 162 | /* |
163 | * Probe for the NAND device. | 163 | * Probe for the NAND device. |
164 | */ | 164 | */ |
165 | static int __devinit socrates_nand_probe(struct platform_device *ofdev, | 165 | static int __devinit socrates_nand_probe(struct platform_device *ofdev) |
166 | const struct of_device_id *ofid) | ||
167 | { | 166 | { |
168 | struct socrates_nand_host *host; | 167 | struct socrates_nand_host *host; |
169 | struct mtd_info *mtd; | 168 | struct mtd_info *mtd; |
@@ -300,7 +299,7 @@ static const struct of_device_id socrates_nand_match[] = | |||
300 | 299 | ||
301 | MODULE_DEVICE_TABLE(of, socrates_nand_match); | 300 | MODULE_DEVICE_TABLE(of, socrates_nand_match); |
302 | 301 | ||
303 | static struct of_platform_driver socrates_nand_driver = { | 302 | static struct platform_driver socrates_nand_driver = { |
304 | .driver = { | 303 | .driver = { |
305 | .name = "socrates_nand", | 304 | .name = "socrates_nand", |
306 | .owner = THIS_MODULE, | 305 | .owner = THIS_MODULE, |
@@ -312,12 +311,12 @@ static struct of_platform_driver socrates_nand_driver = { | |||
312 | 311 | ||
313 | static int __init socrates_nand_init(void) | 312 | static int __init socrates_nand_init(void) |
314 | { | 313 | { |
315 | return of_register_platform_driver(&socrates_nand_driver); | 314 | return platform_driver_register(&socrates_nand_driver); |
316 | } | 315 | } |
317 | 316 | ||
318 | static void __exit socrates_nand_exit(void) | 317 | static void __exit socrates_nand_exit(void) |
319 | { | 318 | { |
320 | of_unregister_platform_driver(&socrates_nand_driver); | 319 | platform_driver_unregister(&socrates_nand_driver); |
321 | } | 320 | } |
322 | 321 | ||
323 | module_init(socrates_nand_init); | 322 | module_init(socrates_nand_init); |
diff --git a/drivers/mtd/onenand/Kconfig b/drivers/mtd/onenand/Kconfig index 4dbd0f58eebf..4f426195f8db 100644 --- a/drivers/mtd/onenand/Kconfig +++ b/drivers/mtd/onenand/Kconfig | |||
@@ -32,7 +32,7 @@ config MTD_ONENAND_OMAP2 | |||
32 | 32 | ||
33 | config MTD_ONENAND_SAMSUNG | 33 | config MTD_ONENAND_SAMSUNG |
34 | tristate "OneNAND on Samsung SOC controller support" | 34 | tristate "OneNAND on Samsung SOC controller support" |
35 | depends on ARCH_S3C64XX || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_S5PV310 | 35 | depends on ARCH_S3C64XX || ARCH_S5PC100 || ARCH_S5PV210 || ARCH_EXYNOS4 |
36 | help | 36 | help |
37 | Support for a OneNAND flash device connected to an Samsung SOC. | 37 | Support for a OneNAND flash device connected to an Samsung SOC. |
38 | S3C64XX/S5PC100 use command mapping method. | 38 | S3C64XX/S5PC100 use command mapping method. |
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index e78914938c5c..ac08750748a3 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c | |||
@@ -131,7 +131,7 @@ static struct platform_driver generic_onenand_driver = { | |||
131 | .remove = __devexit_p(generic_onenand_remove), | 131 | .remove = __devexit_p(generic_onenand_remove), |
132 | }; | 132 | }; |
133 | 133 | ||
134 | MODULE_ALIAS(DRIVER_NAME); | 134 | MODULE_ALIAS("platform:" DRIVER_NAME); |
135 | 135 | ||
136 | static int __init generic_onenand_init(void) | 136 | static int __init generic_onenand_init(void) |
137 | { | 137 | { |
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index ec26399e3cf2..14a49abe057e 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -840,7 +840,7 @@ static void __exit omap2_onenand_exit(void) | |||
840 | module_init(omap2_onenand_init); | 840 | module_init(omap2_onenand_init); |
841 | module_exit(omap2_onenand_exit); | 841 | module_exit(omap2_onenand_exit); |
842 | 842 | ||
843 | MODULE_ALIAS(DRIVER_NAME); | 843 | MODULE_ALIAS("platform:" DRIVER_NAME); |
844 | MODULE_LICENSE("GPL"); | 844 | MODULE_LICENSE("GPL"); |
845 | MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@nokia.com>"); | 845 | MODULE_AUTHOR("Jarkko Lavinen <jarkko.lavinen@nokia.com>"); |
846 | MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2 / OMAP3"); | 846 | MODULE_DESCRIPTION("Glue layer for OneNAND flash on OMAP2 / OMAP3"); |