MTD DocBook: fix ioremap return type

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Jan 2 05:59:02 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=de58288d1dc4ec73d36395a3c4a7708f01311d20
Commit:     de58288d1dc4ec73d36395a3c4a7708f01311d20
Parent:     e026255f7d0e56006a147b190ae23be95cb0a9bd
Author:     H Hartley Sweeten <hsweeten at visionengravers.com>
AuthorDate: Fri Jan 1 20:35:54 2010 -0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sat Jan 2 10:11:27 2010 +0000

    MTD DocBook: fix ioremap return type
    
    ioremap() returns a void __iomem * not an unsigned long.  Update the
    Documentation file to reflect this.
    
    Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
    Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 Documentation/DocBook/mtdnand.tmpl |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index f508a8a..5e7d84b 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -174,7 +174,7 @@
 		</para>
 		<programlisting>
 static struct mtd_info *board_mtd;
-static unsigned long baseaddr;
+static void __iomem *baseaddr;
 		</programlisting>
 		<para>
 			Static example
@@ -182,7 +182,7 @@ static unsigned long baseaddr;
 		<programlisting>
 static struct mtd_info board_mtd;
 static struct nand_chip board_chip;
-static unsigned long baseaddr;
+static void __iomem *baseaddr;
 		</programlisting>
 	</sect1>
 	<sect1 id="Partition_defines">
@@ -283,8 +283,8 @@ int __init board_init (void)
 	}
 
 	/* map physical address */
-	baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
-	if(!baseaddr){
+	baseaddr = ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
+	if (!baseaddr) {
 		printk("Ioremap to access NAND chip failed\n");
 		err = -EIO;
 		goto out_mtd;
@@ -316,7 +316,7 @@ int __init board_init (void)
 	goto out;
 
 out_ior:
-	iounmap((void *)baseaddr);
+	iounmap(baseaddr);
 out_mtd:
 	kfree (board_mtd);
 out:
@@ -341,7 +341,7 @@ static void __exit board_cleanup (void)
 	nand_release (board_mtd);
 
 	/* unmap physical address */
-	iounmap((void *)baseaddr);
+	iounmap(baseaddr);
 	
 	/* Free the MTD device structure */
 	kfree (board_mtd);



More information about the linux-mtd-cvs mailing list