Commit 99dbd268 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] diskonchip missing iomem annotations

some trivial iomem annotations were still missing
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e4de2b27
...@@ -541,7 +541,7 @@ static void DoC2k_init(struct mtd_info *mtd) ...@@ -541,7 +541,7 @@ static void DoC2k_init(struct mtd_info *mtd)
printk(KERN_NOTICE printk(KERN_NOTICE
"Ignoring DiskOnChip 2000 at 0x%lX - already configured\n", "Ignoring DiskOnChip 2000 at 0x%lX - already configured\n",
this->physadr); this->physadr);
iounmap((void *) this->virtadr); iounmap(this->virtadr);
kfree(mtd); kfree(mtd);
return; return;
} }
...@@ -573,7 +573,7 @@ static void DoC2k_init(struct mtd_info *mtd) ...@@ -573,7 +573,7 @@ static void DoC2k_init(struct mtd_info *mtd)
default: default:
printk("Unknown ChipID 0x%02x\n", this->ChipID); printk("Unknown ChipID 0x%02x\n", this->ChipID);
kfree(mtd); kfree(mtd);
iounmap((void *) this->virtadr); iounmap(this->virtadr);
return; return;
} }
...@@ -612,7 +612,7 @@ static void DoC2k_init(struct mtd_info *mtd) ...@@ -612,7 +612,7 @@ static void DoC2k_init(struct mtd_info *mtd)
if (!this->totlen) { if (!this->totlen) {
kfree(mtd); kfree(mtd);
iounmap((void *) this->virtadr); iounmap(this->virtadr);
} else { } else {
this->nextdoc = doc2klist; this->nextdoc = doc2klist;
doc2klist = mtd; doc2klist = mtd;
...@@ -1293,7 +1293,7 @@ static void __exit cleanup_doc2000(void) ...@@ -1293,7 +1293,7 @@ static void __exit cleanup_doc2000(void)
del_mtd_device(mtd); del_mtd_device(mtd);
iounmap((void *) this->virtadr); iounmap(this->virtadr);
kfree(this->chips); kfree(this->chips);
kfree(mtd); kfree(mtd);
} }
......
...@@ -346,7 +346,7 @@ static void DoCMil_init(struct mtd_info *mtd) ...@@ -346,7 +346,7 @@ static void DoCMil_init(struct mtd_info *mtd)
if (DoCMil_is_alias(this, old)) { if (DoCMil_is_alias(this, old)) {
printk(KERN_NOTICE "Ignoring DiskOnChip Millennium at " printk(KERN_NOTICE "Ignoring DiskOnChip Millennium at "
"0x%lX - already configured\n", this->physadr); "0x%lX - already configured\n", this->physadr);
iounmap((void *)this->virtadr); iounmap(this->virtadr);
kfree(mtd); kfree(mtd);
return; return;
} }
...@@ -392,7 +392,7 @@ static void DoCMil_init(struct mtd_info *mtd) ...@@ -392,7 +392,7 @@ static void DoCMil_init(struct mtd_info *mtd)
if (!this->totlen) { if (!this->totlen) {
kfree(mtd); kfree(mtd);
iounmap((void *)this->virtadr); iounmap(this->virtadr);
} else { } else {
this->nextdoc = docmillist; this->nextdoc = docmillist;
docmillist = mtd; docmillist = mtd;
...@@ -873,7 +873,7 @@ static void __exit cleanup_doc2001(void) ...@@ -873,7 +873,7 @@ static void __exit cleanup_doc2001(void)
del_mtd_device(mtd); del_mtd_device(mtd);
iounmap((void *)this->virtadr); iounmap(this->virtadr);
kfree(this->chips); kfree(this->chips);
kfree(mtd); kfree(mtd);
} }
......
...@@ -470,7 +470,7 @@ static void DoCMilPlus_init(struct mtd_info *mtd) ...@@ -470,7 +470,7 @@ static void DoCMilPlus_init(struct mtd_info *mtd)
printk(KERN_NOTICE "Ignoring DiskOnChip Millennium " printk(KERN_NOTICE "Ignoring DiskOnChip Millennium "
"Plus at 0x%lX - already configured\n", "Plus at 0x%lX - already configured\n",
this->physadr); this->physadr);
iounmap((void *)this->virtadr); iounmap(this->virtadr);
kfree(mtd); kfree(mtd);
return; return;
} }
...@@ -514,7 +514,7 @@ static void DoCMilPlus_init(struct mtd_info *mtd) ...@@ -514,7 +514,7 @@ static void DoCMilPlus_init(struct mtd_info *mtd)
if (!this->totlen) { if (!this->totlen) {
kfree(mtd); kfree(mtd);
iounmap((void *)this->virtadr); iounmap(this->virtadr);
} else { } else {
this->nextdoc = docmilpluslist; this->nextdoc = docmilpluslist;
docmilpluslist = mtd; docmilpluslist = mtd;
...@@ -1139,7 +1139,7 @@ static void __exit cleanup_doc2001plus(void) ...@@ -1139,7 +1139,7 @@ static void __exit cleanup_doc2001plus(void)
del_mtd_device(mtd); del_mtd_device(mtd);
iounmap((void *)this->virtadr); iounmap(this->virtadr);
kfree(this->chips); kfree(this->chips);
kfree(mtd); kfree(mtd);
} }
......
...@@ -94,9 +94,9 @@ static unsigned long __initdata doc_locations[] = { ...@@ -94,9 +94,9 @@ static unsigned long __initdata doc_locations[] = {
/* doccheck: Probe a given memory window to see if there's a DiskOnChip present */ /* doccheck: Probe a given memory window to see if there's a DiskOnChip present */
static inline int __init doccheck(unsigned long potential, unsigned long physadr) static inline int __init doccheck(void __iomem *potential, unsigned long physadr)
{ {
unsigned long window=potential; void __iomem *window=potential;
unsigned char tmp, tmpb, tmpc, ChipID; unsigned char tmp, tmpb, tmpc, ChipID;
#ifndef DOC_PASSIVE_PROBE #ifndef DOC_PASSIVE_PROBE
unsigned char tmp2; unsigned char tmp2;
...@@ -233,7 +233,7 @@ static int docfound; ...@@ -233,7 +233,7 @@ static int docfound;
static void __init DoC_Probe(unsigned long physadr) static void __init DoC_Probe(unsigned long physadr)
{ {
unsigned long docptr; void __iomem *docptr;
struct DiskOnChip *this; struct DiskOnChip *this;
struct mtd_info *mtd; struct mtd_info *mtd;
int ChipID; int ChipID;
...@@ -243,7 +243,7 @@ static void __init DoC_Probe(unsigned long physadr) ...@@ -243,7 +243,7 @@ static void __init DoC_Probe(unsigned long physadr)
char *im_modname = NULL; char *im_modname = NULL;
void (*initroutine)(struct mtd_info *) = NULL; void (*initroutine)(struct mtd_info *) = NULL;
docptr = (unsigned long)ioremap(physadr, DOC_IOREMAP_LEN); docptr = ioremap(physadr, DOC_IOREMAP_LEN);
if (!docptr) if (!docptr)
return; return;
...@@ -252,7 +252,7 @@ static void __init DoC_Probe(unsigned long physadr) ...@@ -252,7 +252,7 @@ static void __init DoC_Probe(unsigned long physadr)
if (ChipID == DOC_ChipID_Doc2kTSOP) { if (ChipID == DOC_ChipID_Doc2kTSOP) {
/* Remove this at your own peril. The hardware driver works but nothing prevents you from erasing bad blocks */ /* Remove this at your own peril. The hardware driver works but nothing prevents you from erasing bad blocks */
printk(KERN_NOTICE "Refusing to drive DiskOnChip 2000 TSOP until Bad Block Table is correctly supported by INFTL\n"); printk(KERN_NOTICE "Refusing to drive DiskOnChip 2000 TSOP until Bad Block Table is correctly supported by INFTL\n");
iounmap((void *)docptr); iounmap(docptr);
return; return;
} }
docfound = 1; docfound = 1;
...@@ -260,7 +260,7 @@ static void __init DoC_Probe(unsigned long physadr) ...@@ -260,7 +260,7 @@ static void __init DoC_Probe(unsigned long physadr)
if (!mtd) { if (!mtd) {
printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n"); printk(KERN_WARNING "Cannot allocate memory for data structures. Dropping.\n");
iounmap((void *)docptr); iounmap(docptr);
return; return;
} }
...@@ -270,7 +270,7 @@ static void __init DoC_Probe(unsigned long physadr) ...@@ -270,7 +270,7 @@ static void __init DoC_Probe(unsigned long physadr)
memset((char *)this, 0, sizeof(struct DiskOnChip)); memset((char *)this, 0, sizeof(struct DiskOnChip));
mtd->priv = this; mtd->priv = this;
this->virtadr = (void __iomem *)docptr; this->virtadr = docptr;
this->physadr = physadr; this->physadr = physadr;
this->ChipID = ChipID; this->ChipID = ChipID;
sprintf(namebuf, "with ChipID %2.2X", ChipID); sprintf(namebuf, "with ChipID %2.2X", ChipID);
...@@ -318,7 +318,7 @@ static void __init DoC_Probe(unsigned long physadr) ...@@ -318,7 +318,7 @@ static void __init DoC_Probe(unsigned long physadr)
printk(KERN_NOTICE "Cannot find driver for DiskOnChip %s at 0x%lX\n", name, physadr); printk(KERN_NOTICE "Cannot find driver for DiskOnChip %s at 0x%lX\n", name, physadr);
kfree(mtd); kfree(mtd);
} }
iounmap((void *)docptr); iounmap(docptr);
} }
......
...@@ -1699,7 +1699,7 @@ static inline int __init doc_probe(unsigned long physadr) ...@@ -1699,7 +1699,7 @@ static inline int __init doc_probe(unsigned long physadr)
actually a DiskOnChip. */ actually a DiskOnChip. */
WriteDOC(save_control, virtadr, DOCControl); WriteDOC(save_control, virtadr, DOCControl);
fail: fail:
iounmap((void *)virtadr); iounmap(virtadr);
return ret; return ret;
} }
...@@ -1715,7 +1715,7 @@ static void release_nanddoc(void) ...@@ -1715,7 +1715,7 @@ static void release_nanddoc(void)
nextmtd = doc->nextdoc; nextmtd = doc->nextdoc;
nand_release(mtd); nand_release(mtd);
iounmap((void *)doc->virtadr); iounmap(doc->virtadr);
kfree(mtd); kfree(mtd);
} }
} }
......
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
#define WriteDOC_(d, adr, reg) do{ *(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0) #define WriteDOC_(d, adr, reg) do{ *(volatile __u16 *)(((unsigned long)adr)+((reg)<<1)) = (__u16)d; wmb();} while(0)
#define DOC_IOREMAP_LEN 0x4000 #define DOC_IOREMAP_LEN 0x4000
#else #else
#define ReadDOC_(adr, reg) readb((void __iomem *)(((unsigned long)adr) + (reg))) #define ReadDOC_(adr, reg) readb((void __iomem *)(adr) + (reg))
#define WriteDOC_(d, adr, reg) writeb(d, (void __iomem *)(((unsigned long)adr) + (reg))) #define WriteDOC_(d, adr, reg) writeb(d, (void __iomem *)(adr) + (reg))
#define DOC_IOREMAP_LEN 0x2000 #define DOC_IOREMAP_LEN 0x2000
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment