Skip to content

Commit

Permalink
DocBook: fix ioremap return type
Browse files Browse the repository at this point in the history
ioremap() returns a void __iomem * not an unsigned long.  Update the
Documentation file to reflect this.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
H Hartley Sweeten authored and Linus Torvalds committed Jan 2, 2010
1 parent 143724f commit 8d9f99c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Documentation/DocBook/mtdnand.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@
</para>
<programlisting>
static struct mtd_info *board_mtd;
static unsigned long baseaddr;
static void __iomem *baseaddr;
</programlisting>
<para>
Static example
</para>
<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">
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -316,7 +316,7 @@ int __init board_init (void)
goto out;

out_ior:
iounmap((void *)baseaddr);
iounmap(baseaddr);
out_mtd:
kfree (board_mtd);
out:
Expand All @@ -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);
Expand Down

0 comments on commit 8d9f99c

Please sign in to comment.