diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 10:25:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 10:25:43 -0400 |
commit | 05ec7dd8dd5aa42c22a49682e4a51cadd4166b7e (patch) | |
tree | 6370b43c0d8f324aa7421bbb5a647aa04ab5d747 /drivers/mtd/nand/au1550nd.c | |
parent | c316ba3b518bc35ce5aef5421135220389f4eb98 (diff) | |
parent | 8046112818b70329e930b1d4557ef0876c1ad2bb (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (154 commits)
mtd: cfi_cmdset_0002: use AMD standard command-set with Winbond flash chips
mtd: cfi_cmdset_0002: Fix MODULE_ALIAS and linkage for new 0701 commandset ID
mtd: mxc_nand: Remove duplicate NAND_CMD_RESET case value
mtd: update gfp/slab.h includes
jffs2: Stop triggering block erases from jffs2_write_super()
jffs2: Rename jffs2_erase_pending_trigger() to jffs2_dirty_trigger()
jffs2: Use jffs2_garbage_collect_trigger() to trigger pending erases
jffs2: Require jffs2_garbage_collect_trigger() to be called with lock held
jffs2: Wake GC thread when there are blocks to be erased
jffs2: Erase pending blocks in GC pass, avoid invalid -EIO return
jffs2: Add 'work_done' return value from jffs2_erase_pending_blocks()
mtd: mtdchar: Do not corrupt backing device of device node inode
mtd/maps/pcmciamtd: Fix printk format for ssize_t in debug messages
drivers/mtd: Use kmemdup
mtd: cfi_cmdset_0002: Fix argument order in bootloc warning
mtd: nand: add Toshiba TC58NVG0 device ID
pcmciamtd: add another ID
pcmciamtd: coding style cleanups
pcmciamtd: fixing obvious errors
mtd: chips: add SST39WF160x NOR-flashes
...
Trivial conflicts due to dev_node removal in drivers/mtd/maps/pcmciamtd.c
Diffstat (limited to 'drivers/mtd/nand/au1550nd.c')
-rw-r--r-- | drivers/mtd/nand/au1550nd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c index 43d46e424040..3ffe05db4923 100644 --- a/drivers/mtd/nand/au1550nd.c +++ b/drivers/mtd/nand/au1550nd.c | |||
@@ -451,7 +451,7 @@ static int __init au1xxx_nand_init(void) | |||
451 | u32 nand_phys; | 451 | u32 nand_phys; |
452 | 452 | ||
453 | /* Allocate memory for MTD device structure and private data */ | 453 | /* Allocate memory for MTD device structure and private data */ |
454 | au1550_mtd = kmalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); | 454 | au1550_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL); |
455 | if (!au1550_mtd) { | 455 | if (!au1550_mtd) { |
456 | printk("Unable to allocate NAND MTD dev structure.\n"); | 456 | printk("Unable to allocate NAND MTD dev structure.\n"); |
457 | return -ENOMEM; | 457 | return -ENOMEM; |
@@ -460,10 +460,6 @@ static int __init au1xxx_nand_init(void) | |||
460 | /* Get pointer to private data */ | 460 | /* Get pointer to private data */ |
461 | this = (struct nand_chip *)(&au1550_mtd[1]); | 461 | this = (struct nand_chip *)(&au1550_mtd[1]); |
462 | 462 | ||
463 | /* Initialize structures */ | ||
464 | memset(au1550_mtd, 0, sizeof(struct mtd_info)); | ||
465 | memset(this, 0, sizeof(struct nand_chip)); | ||
466 | |||
467 | /* Link the private data with the MTD structure */ | 463 | /* Link the private data with the MTD structure */ |
468 | au1550_mtd->priv = this; | 464 | au1550_mtd->priv = this; |
469 | au1550_mtd->owner = THIS_MODULE; | 465 | au1550_mtd->owner = THIS_MODULE; |
@@ -544,7 +540,7 @@ static int __init au1xxx_nand_init(void) | |||
544 | } | 540 | } |
545 | nand_phys = (mem_staddr << 4) & 0xFFFC0000; | 541 | nand_phys = (mem_staddr << 4) & 0xFFFC0000; |
546 | 542 | ||
547 | p_nand = (void __iomem *)ioremap(nand_phys, 0x1000); | 543 | p_nand = ioremap(nand_phys, 0x1000); |
548 | 544 | ||
549 | /* make controller and MTD agree */ | 545 | /* make controller and MTD agree */ |
550 | if (NAND_CS == 0) | 546 | if (NAND_CS == 0) |
@@ -589,7 +585,7 @@ static int __init au1xxx_nand_init(void) | |||
589 | return 0; | 585 | return 0; |
590 | 586 | ||
591 | outio: | 587 | outio: |
592 | iounmap((void *)p_nand); | 588 | iounmap(p_nand); |
593 | 589 | ||
594 | outmem: | 590 | outmem: |
595 | kfree(au1550_mtd); | 591 | kfree(au1550_mtd); |
@@ -610,7 +606,7 @@ static void __exit au1550_cleanup(void) | |||
610 | kfree(au1550_mtd); | 606 | kfree(au1550_mtd); |
611 | 607 | ||
612 | /* Unmap */ | 608 | /* Unmap */ |
613 | iounmap((void *)p_nand); | 609 | iounmap(p_nand); |
614 | } | 610 | } |
615 | 611 | ||
616 | module_exit(au1550_cleanup); | 612 | module_exit(au1550_cleanup); |