Commit 956846c2 authored by Domen Puncer's avatar Domen Puncer Committed by David Woodhouse

MTD: Remove gratuitous (void *) casts.

Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 6f509355
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* not going to guess how to send commands to them, plus I expect they will * not going to guess how to send commands to them, plus I expect they will
* all speak CFI.. * all speak CFI..
* *
* $Id: jedec.c,v 1.21 2004/08/09 13:19:43 dwmw2 Exp $ * $Id: jedec.c,v 1.22 2005/01/05 18:05:11 dwmw2 Exp $
*/ */
#include <linux/init.h> #include <linux/init.h>
...@@ -529,7 +529,7 @@ static int jedec_probe32(struct map_info *map,unsigned long base, ...@@ -529,7 +529,7 @@ static int jedec_probe32(struct map_info *map,unsigned long base,
static int jedec_read(struct mtd_info *mtd, loff_t from, size_t len, static int jedec_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf) size_t *retlen, u_char *buf)
{ {
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
map_copy_from(map, buf, from, len); map_copy_from(map, buf, from, len);
*retlen = len; *retlen = len;
...@@ -541,8 +541,8 @@ static int jedec_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -541,8 +541,8 @@ static int jedec_read(struct mtd_info *mtd, loff_t from, size_t len,
static int jedec_read_banked(struct mtd_info *mtd, loff_t from, size_t len, static int jedec_read_banked(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf) size_t *retlen, u_char *buf)
{ {
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
struct jedec_private *priv = (struct jedec_private *)map->fldrv_priv; struct jedec_private *priv = map->fldrv_priv;
*retlen = 0; *retlen = 0;
while (len > 0) while (len > 0)
...@@ -593,8 +593,8 @@ static int flash_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -593,8 +593,8 @@ static int flash_erase(struct mtd_info *mtd, struct erase_info *instr)
unsigned long NoTime = 0; unsigned long NoTime = 0;
unsigned long start = instr->addr, len = instr->len; unsigned long start = instr->addr, len = instr->len;
unsigned int I; unsigned int I;
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
struct jedec_private *priv = (struct jedec_private *)map->fldrv_priv; struct jedec_private *priv = map->fldrv_priv;
// Verify the arguments.. // Verify the arguments..
if (start + len > mtd->size || if (start + len > mtd->size ||
...@@ -800,8 +800,8 @@ static int flash_write(struct mtd_info *mtd, loff_t start, size_t len, ...@@ -800,8 +800,8 @@ static int flash_write(struct mtd_info *mtd, loff_t start, size_t len,
#define flread(x) map_read8(map,base+(off&((1<<chip->addrshift)-1))+((x)<<chip->addrshift)) #define flread(x) map_read8(map,base+(off&((1<<chip->addrshift)-1))+((x)<<chip->addrshift))
#define flwrite(v,x) map_write8(map,v,base+(off&((1<<chip->addrshift)-1))+((x)<<chip->addrshift)) #define flwrite(v,x) map_write8(map,v,base+(off&((1<<chip->addrshift)-1))+((x)<<chip->addrshift))
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
struct jedec_private *priv = (struct jedec_private *)map->fldrv_priv; struct jedec_private *priv = map->fldrv_priv;
unsigned long base; unsigned long base;
unsigned long off; unsigned long off;
size_t save_len = len; size_t save_len = len;
......
/* /*
* Common code to handle map devices which are simple RAM * Common code to handle map devices which are simple RAM
* (C) 2000 Red Hat. GPL'd. * (C) 2000 Red Hat. GPL'd.
* $Id: map_ram.c,v 1.21 2004/11/16 18:29:00 dwmw2 Exp $ * $Id: map_ram.c,v 1.22 2005/01/05 18:05:12 dwmw2 Exp $
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -83,7 +83,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map) ...@@ -83,7 +83,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
{ {
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
map_copy_from(map, buf, from, len); map_copy_from(map, buf, from, len);
*retlen = len; *retlen = len;
...@@ -92,7 +92,7 @@ static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *r ...@@ -92,7 +92,7 @@ static int mapram_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *r
static int mapram_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) static int mapram_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
{ {
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
map_copy_to(map, to, buf, len); map_copy_to(map, to, buf, len);
*retlen = len; *retlen = len;
...@@ -103,7 +103,7 @@ static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr) ...@@ -103,7 +103,7 @@ static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr)
{ {
/* Yeah, it's inefficient. Who cares? It's faster than a _real_ /* Yeah, it's inefficient. Who cares? It's faster than a _real_
flash erase. */ flash erase. */
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
map_word allff; map_word allff;
unsigned long i; unsigned long i;
......
/* /*
* Common code to handle map devices which are simple ROM * Common code to handle map devices which are simple ROM
* (C) 2000 Red Hat. GPL'd. * (C) 2000 Red Hat. GPL'd.
* $Id: map_rom.c,v 1.22 2004/11/16 18:29:00 dwmw2 Exp $ * $Id: map_rom.c,v 1.23 2005/01/05 18:05:12 dwmw2 Exp $
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -57,7 +57,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map) ...@@ -57,7 +57,7 @@ static struct mtd_info *map_rom_probe(struct map_info *map)
static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) static int maprom_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
{ {
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
map_copy_from(map, buf, from, len); map_copy_from(map, buf, from, len);
*retlen = len; *retlen = len;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (c) 1999 Machine Vision Holdings, Inc. * (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
* *
* $Id: doc2000.c,v 1.65 2005/01/05 12:40:36 dwmw2 Exp $ * $Id: doc2000.c,v 1.66 2005/01/05 18:05:12 dwmw2 Exp $
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -527,14 +527,14 @@ static const char im_name[] = "DoC2k_init"; ...@@ -527,14 +527,14 @@ static const char im_name[] = "DoC2k_init";
*/ */
static void DoC2k_init(struct mtd_info *mtd) static void DoC2k_init(struct mtd_info *mtd)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
struct DiskOnChip *old = NULL; struct DiskOnChip *old = NULL;
int maxchips; int maxchips;
/* We must avoid being called twice for the same device. */ /* We must avoid being called twice for the same device. */
if (doc2klist) if (doc2klist)
old = (struct DiskOnChip *) doc2klist->priv; old = doc2klist->priv;
while (old) { while (old) {
if (DoC2k_is_alias(old, this)) { if (DoC2k_is_alias(old, this)) {
...@@ -546,7 +546,7 @@ static void DoC2k_init(struct mtd_info *mtd) ...@@ -546,7 +546,7 @@ static void DoC2k_init(struct mtd_info *mtd)
return; return;
} }
if (old->nextdoc) if (old->nextdoc)
old = (struct DiskOnChip *) old->nextdoc->priv; old = old->nextdoc->priv;
else else
old = NULL; old = NULL;
} }
...@@ -633,7 +633,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -633,7 +633,7 @@ static int doc_read(struct mtd_info *mtd, loff_t from, size_t len,
static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel) size_t * retlen, u_char * buf, u_char * eccbuf, struct nand_oobinfo *oobsel)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip; struct Nand *mychip;
unsigned char syndrome[6]; unsigned char syndrome[6];
...@@ -790,7 +790,7 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -790,7 +790,7 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
size_t * retlen, const u_char * buf, size_t * retlen, const u_char * buf,
u_char * eccbuf, struct nand_oobinfo *oobsel) u_char * eccbuf, struct nand_oobinfo *oobsel)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */ int di; /* Yes, DI is a hangover from when I was disassembling the binary driver */
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
volatile char dummy; volatile char dummy;
...@@ -1033,7 +1033,7 @@ static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs, ...@@ -1033,7 +1033,7 @@ static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
size_t * retlen, u_char * buf) size_t * retlen, u_char * buf)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
int len256 = 0, ret; int len256 = 0, ret;
struct Nand *mychip; struct Nand *mychip;
...@@ -1091,7 +1091,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -1091,7 +1091,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len, static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len,
size_t * retlen, const u_char * buf) size_t * retlen, const u_char * buf)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
int len256 = 0; int len256 = 0;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
...@@ -1194,7 +1194,7 @@ static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -1194,7 +1194,7 @@ static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len,
static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
size_t * retlen, const u_char * buf) size_t * retlen, const u_char * buf)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
int ret; int ret;
down(&this->lock); down(&this->lock);
...@@ -1206,7 +1206,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -1206,7 +1206,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
static int doc_erase(struct mtd_info *mtd, struct erase_info *instr) static int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
{ {
struct DiskOnChip *this = (struct DiskOnChip *) mtd->priv; struct DiskOnChip *this = mtd->priv;
__u32 ofs = instr->addr; __u32 ofs = instr->addr;
__u32 len = instr->len; __u32 len = instr->len;
volatile int dummy; volatile int dummy;
...@@ -1288,7 +1288,7 @@ static void __exit cleanup_doc2000(void) ...@@ -1288,7 +1288,7 @@ static void __exit cleanup_doc2000(void)
struct DiskOnChip *this; struct DiskOnChip *this;
while ((mtd = doc2klist)) { while ((mtd = doc2klist)) {
this = (struct DiskOnChip *) mtd->priv; this = mtd->priv;
doc2klist = this->nextdoc; doc2klist = this->nextdoc;
del_mtd_device(mtd); del_mtd_device(mtd);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* (c) 1999 Machine Vision Holdings, Inc. * (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
* *
* $Id: doc2001.c,v 1.47 2005/01/05 12:40:36 dwmw2 Exp $ * $Id: doc2001.c,v 1.48 2005/01/05 18:05:12 dwmw2 Exp $
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -335,12 +335,12 @@ static const char im_name[] = "DoCMil_init"; ...@@ -335,12 +335,12 @@ static const char im_name[] = "DoCMil_init";
*/ */
static void DoCMil_init(struct mtd_info *mtd) static void DoCMil_init(struct mtd_info *mtd)
{ {
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
struct DiskOnChip *old = NULL; struct DiskOnChip *old = NULL;
/* We must avoid being called twice for the same device. */ /* We must avoid being called twice for the same device. */
if (docmillist) if (docmillist)
old = (struct DiskOnChip *)docmillist->priv; old = docmillist->priv;
while (old) { while (old) {
if (DoCMil_is_alias(this, old)) { if (DoCMil_is_alias(this, old)) {
...@@ -351,7 +351,7 @@ static void DoCMil_init(struct mtd_info *mtd) ...@@ -351,7 +351,7 @@ static void DoCMil_init(struct mtd_info *mtd)
return; return;
} }
if (old->nextdoc) if (old->nextdoc)
old = (struct DiskOnChip *)old->nextdoc->priv; old = old->nextdoc->priv;
else else
old = NULL; old = NULL;
} }
...@@ -416,7 +416,7 @@ static int doc_read_ecc (struct mtd_info *mtd, loff_t from, size_t len, ...@@ -416,7 +416,7 @@ static int doc_read_ecc (struct mtd_info *mtd, loff_t from, size_t len,
int i, ret; int i, ret;
volatile char dummy; volatile char dummy;
unsigned char syndrome[6]; unsigned char syndrome[6];
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[from >> (this->chipshift)]; struct Nand *mychip = &this->chips[from >> (this->chipshift)];
...@@ -542,7 +542,7 @@ static int doc_write_ecc (struct mtd_info *mtd, loff_t to, size_t len, ...@@ -542,7 +542,7 @@ static int doc_write_ecc (struct mtd_info *mtd, loff_t to, size_t len,
{ {
int i,ret = 0; int i,ret = 0;
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[to >> (this->chipshift)]; struct Nand *mychip = &this->chips[to >> (this->chipshift)];
...@@ -677,7 +677,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -677,7 +677,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
int i; int i;
#endif #endif
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
...@@ -729,7 +729,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -729,7 +729,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
#endif #endif
volatile char dummy; volatile char dummy;
int ret = 0; int ret = 0;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
...@@ -796,7 +796,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -796,7 +796,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
int doc_erase (struct mtd_info *mtd, struct erase_info *instr) int doc_erase (struct mtd_info *mtd, struct erase_info *instr)
{ {
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
__u32 ofs = instr->addr; __u32 ofs = instr->addr;
__u32 len = instr->len; __u32 len = instr->len;
void __iomem *docptr = this->virtadr; void __iomem *docptr = this->virtadr;
...@@ -868,7 +868,7 @@ static void __exit cleanup_doc2001(void) ...@@ -868,7 +868,7 @@ static void __exit cleanup_doc2001(void)
struct DiskOnChip *this; struct DiskOnChip *this;
while ((mtd=docmillist)) { while ((mtd=docmillist)) {
this = (struct DiskOnChip *)mtd->priv; this = mtd->priv;
docmillist = this->nextdoc; docmillist = this->nextdoc;
del_mtd_device(mtd); del_mtd_device(mtd);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* (c) 1999 Machine Vision Holdings, Inc. * (c) 1999 Machine Vision Holdings, Inc.
* (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org> * (c) 1999, 2000 David Woodhouse <dwmw2@infradead.org>
* *
* $Id: doc2001plus.c,v 1.12 2005/01/05 12:40:36 dwmw2 Exp $ * $Id: doc2001plus.c,v 1.13 2005/01/05 18:05:12 dwmw2 Exp $
* *
* Released under GPL * Released under GPL
*/ */
...@@ -190,7 +190,7 @@ static int DoC_SelectFloor(void __iomem * docptr, int floor) ...@@ -190,7 +190,7 @@ static int DoC_SelectFloor(void __iomem * docptr, int floor)
may not want it */ may not want it */
static unsigned int DoC_GetDataOffset(struct mtd_info *mtd, loff_t *from) static unsigned int DoC_GetDataOffset(struct mtd_info *mtd, loff_t *from)
{ {
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
if (this->interleave) { if (this->interleave) {
unsigned int ofs = *from & 0x3ff; unsigned int ofs = *from & 0x3ff;
...@@ -458,12 +458,12 @@ static const char im_name[] = "DoCMilPlus_init"; ...@@ -458,12 +458,12 @@ static const char im_name[] = "DoCMilPlus_init";
*/ */
static void DoCMilPlus_init(struct mtd_info *mtd) static void DoCMilPlus_init(struct mtd_info *mtd)
{ {
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
struct DiskOnChip *old = NULL; struct DiskOnChip *old = NULL;
/* We must avoid being called twice for the same device. */ /* We must avoid being called twice for the same device. */
if (docmilpluslist) if (docmilpluslist)
old = (struct DiskOnChip *)docmilpluslist->priv; old = docmilpluslist->priv;
while (old) { while (old) {
if (DoCMilPlus_is_alias(this, old)) { if (DoCMilPlus_is_alias(this, old)) {
...@@ -475,7 +475,7 @@ static void DoCMilPlus_init(struct mtd_info *mtd) ...@@ -475,7 +475,7 @@ static void DoCMilPlus_init(struct mtd_info *mtd)
return; return;
} }
if (old->nextdoc) if (old->nextdoc)
old = (struct DiskOnChip *)old->nextdoc->priv; old = old->nextdoc->priv;
else else
old = NULL; old = NULL;
} }
...@@ -530,7 +530,7 @@ static int doc_dumpblk(struct mtd_info *mtd, loff_t from) ...@@ -530,7 +530,7 @@ static int doc_dumpblk(struct mtd_info *mtd, loff_t from)
{ {
int i; int i;
loff_t fofs; loff_t fofs;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem * docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[from >> (this->chipshift)]; struct Nand *mychip = &this->chips[from >> (this->chipshift)];
unsigned char *bp, buf[1056]; unsigned char *bp, buf[1056];
...@@ -615,7 +615,7 @@ static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -615,7 +615,7 @@ static int doc_read_ecc(struct mtd_info *mtd, loff_t from, size_t len,
volatile char dummy; volatile char dummy;
loff_t fofs; loff_t fofs;
unsigned char syndrome[6]; unsigned char syndrome[6];
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem * docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[from >> (this->chipshift)]; struct Nand *mychip = &this->chips[from >> (this->chipshift)];
...@@ -754,7 +754,7 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len, ...@@ -754,7 +754,7 @@ static int doc_write_ecc(struct mtd_info *mtd, loff_t to, size_t len,
int i, before, ret = 0; int i, before, ret = 0;
loff_t fto; loff_t fto;
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem * docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[to >> (this->chipshift)]; struct Nand *mychip = &this->chips[to >> (this->chipshift)];
...@@ -880,7 +880,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -880,7 +880,7 @@ static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
size_t *retlen, u_char *buf) size_t *retlen, u_char *buf)
{ {
loff_t fofs, base; loff_t fofs, base;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem * docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
size_t i, size, got, want; size_t i, size, got, want;
...@@ -958,7 +958,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -958,7 +958,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
{ {
volatile char dummy; volatile char dummy;
loff_t fofs, base; loff_t fofs, base;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
void __iomem * docptr = this->virtadr; void __iomem * docptr = this->virtadr;
struct Nand *mychip = &this->chips[ofs >> this->chipshift]; struct Nand *mychip = &this->chips[ofs >> this->chipshift];
size_t i, size, got, want; size_t i, size, got, want;
...@@ -1058,7 +1058,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len, ...@@ -1058,7 +1058,7 @@ static int doc_write_oob(struct mtd_info *mtd, loff_t ofs, size_t len,
int doc_erase(struct mtd_info *mtd, struct erase_info *instr) int doc_erase(struct mtd_info *mtd, struct erase_info *instr)
{ {
volatile char dummy; volatile char dummy;
struct DiskOnChip *this = (struct DiskOnChip *)mtd->priv; struct DiskOnChip *this = mtd->priv;
__u32 ofs = instr->addr; __u32 ofs = instr->addr;
__u32 len = instr->len; __u32 len = instr->len;
void __iomem * docptr = this->virtadr; void __iomem * docptr = this->virtadr;
...@@ -1134,7 +1134,7 @@ static void __exit cleanup_doc2001plus(void) ...@@ -1134,7 +1134,7 @@ static void __exit cleanup_doc2001plus(void)
struct DiskOnChip *this; struct DiskOnChip *this;
while ((mtd=docmilpluslist)) { while ((mtd=docmilpluslist)) {
this = (struct DiskOnChip *)mtd->priv; this = mtd->priv;
docmilpluslist = this->nextdoc; docmilpluslist = this->nextdoc;
del_mtd_device(mtd); del_mtd_device(mtd);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
* *
* $Id: ms02-nv.c,v 1.7 2004/07/29 14:16:45 macro Exp $ * $Id: ms02-nv.c,v 1.8 2005/01/05 18:05:12 dwmw2 Exp $
*/ */
#include <linux/init.h> #include <linux/init.h>
...@@ -59,7 +59,7 @@ static struct mtd_info *root_ms02nv_mtd; ...@@ -59,7 +59,7 @@ static struct mtd_info *root_ms02nv_mtd;
static int ms02nv_read(struct mtd_info *mtd, loff_t from, static int ms02nv_read(struct mtd_info *mtd, loff_t from,
size_t len, size_t *retlen, u_char *buf) size_t len, size_t *retlen, u_char *buf)
{ {
struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv; struct ms02nv_private *mp = mtd->priv;
if (from + len > mtd->size) if (from + len > mtd->size)
return -EINVAL; return -EINVAL;
...@@ -73,7 +73,7 @@ static int ms02nv_read(struct mtd_info *mtd, loff_t from, ...@@ -73,7 +73,7 @@ static int ms02nv_read(struct mtd_info *mtd, loff_t from,
static int ms02nv_write(struct mtd_info *mtd, loff_t to, static int ms02nv_write(struct mtd_info *mtd, loff_t to,
size_t len, size_t *retlen, const u_char *buf) size_t len, size_t *retlen, const u_char *buf)
{ {
struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv; struct ms02nv_private *mp = mtd->priv;
if (to + len > mtd->size) if (to + len > mtd->size)
return -EINVAL; return -EINVAL;
...@@ -265,7 +265,7 @@ static int __init ms02nv_init_one(ulong addr) ...@@ -265,7 +265,7 @@ static int __init ms02nv_init_one(ulong addr)
static void __exit ms02nv_remove_one(void) static void __exit ms02nv_remove_one(void)
{ {
struct mtd_info *mtd = root_ms02nv_mtd; struct mtd_info *mtd = root_ms02nv_mtd;
struct ms02nv_private *mp = (struct ms02nv_private *)mtd->priv; struct ms02nv_private *mp = mtd->priv;
root_ms02nv_mtd = mp->next; root_ms02nv_mtd = mp->next;
......
/* /*
* mtdram - a test mtd device * mtdram - a test mtd device
* $Id: mtdram.c,v 1.34 2004/11/16 18:29:01 dwmw2 Exp $ * $Id: mtdram.c,v 1.35 2005/01/05 18:05:12 dwmw2 Exp $
* Author: Alexander Larsson <alex@cendio.se> * Author: Alexander Larsson <alex@cendio.se>
* *
* Copyright (c) 1999 Alexander Larsson <alex@cendio.se> * Copyright (c) 1999 Alexander Larsson <alex@cendio.se>
...@@ -158,7 +158,7 @@ static int __init init_mtdram(void) ...@@ -158,7 +158,7 @@ static int __init init_mtdram(void)
void *addr; void *addr;
int err; int err;
/* Allocate some memory */ /* Allocate some memory */
mtd_info = (struct mtd_info *)kmalloc(sizeof(struct mtd_info), GFP_KERNEL); mtd_info = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd_info) if (!mtd_info)
return -ENOMEM; return -ENOMEM;
...@@ -191,7 +191,7 @@ static int __init init_mtdram(void) ...@@ -191,7 +191,7 @@ static int __init init_mtdram(void)
void *addr; void *addr;
int err; int err;
/* Allocate some memory */ /* Allocate some memory */
mtd_info = (struct mtd_info *)kmalloc(sizeof(struct mtd_info), GFP_KERNEL); mtd_info = kmalloc(sizeof(struct mtd_info), GFP_KERNEL);
if (!mtd_info) if (!mtd_info)
return -ENOMEM; return -ENOMEM;
......
/** /**
* $Id: phram.c,v 1.10 2004/12/10 17:53:13 joern Exp $ * $Id: phram.c,v 1.11 2005/01/05 18:05:13 dwmw2 Exp $
* *
* Copyright (c) ???? Jochen Schuble <psionic@psionic.de> * Copyright (c) ???? Jochen Schuble <psionic@psionic.de>
* Copyright (c) 2003-2004 Jrn Engel <joern@wh.fh-wedel.de> * Copyright (c) 2003-2004 Jrn Engel <joern@wh.fh-wedel.de>
...@@ -39,7 +39,7 @@ static LIST_HEAD(phram_list); ...@@ -39,7 +39,7 @@ static LIST_HEAD(phram_list);
static int phram_erase(struct mtd_info *mtd, struct erase_info *instr) static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
{ {
u_char *start = (u_char *)mtd->priv; u_char *start = mtd->priv;
if (instr->addr + instr->len > mtd->size) if (instr->addr + instr->len > mtd->size)
return -EINVAL; return -EINVAL;
...@@ -61,7 +61,7 @@ static int phram_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -61,7 +61,7 @@ static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
static int phram_point(struct mtd_info *mtd, loff_t from, size_t len, static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char **mtdbuf) size_t *retlen, u_char **mtdbuf)
{ {
u_char *start = (u_char *)mtd->priv; u_char *start = mtd->priv;
if (from + len > mtd->size) if (from + len > mtd->size)
return -EINVAL; return -EINVAL;
...@@ -78,7 +78,7 @@ static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_ ...@@ -78,7 +78,7 @@ static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_
static int phram_read(struct mtd_info *mtd, loff_t from, size_t len, static int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf) size_t *retlen, u_char *buf)
{ {
u_char *start = (u_char *)mtd->priv; u_char *start = mtd->priv;
if (from + len > mtd->size) if (from + len > mtd->size)
return -EINVAL; return -EINVAL;
...@@ -92,7 +92,7 @@ static int phram_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -92,7 +92,7 @@ static int phram_read(struct mtd_info *mtd, loff_t from, size_t len,
static int phram_write(struct mtd_info *mtd, loff_t to, size_t len, static int phram_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf) size_t *retlen, const u_char *buf)
{ {
u_char *start = (u_char *)mtd->priv; u_char *start = mtd->priv;
if (to + len > mtd->size) if (to + len > mtd->size)
return -EINVAL; return -EINVAL;
......
/* /*
* $Id: pmc551.c,v 1.29 2004/11/16 18:29:01 dwmw2 Exp $ * $Id: pmc551.c,v 1.30 2005/01/05 18:05:13 dwmw2 Exp $
* *
* PMC551 PCI Mezzanine Ram Device * PMC551 PCI Mezzanine Ram Device
* *
...@@ -113,7 +113,7 @@ static struct mtd_info *pmc551list; ...@@ -113,7 +113,7 @@ static struct mtd_info *pmc551list;
static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr) static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr)
{ {
struct mypriv *priv = (struct mypriv *)mtd->priv; struct mypriv *priv = mtd->priv;
u32 soff_hi, soff_lo; /* start address offset hi/lo */ u32 soff_hi, soff_lo; /* start address offset hi/lo */
u32 eoff_hi, eoff_lo; /* end address offset hi/lo */ u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
unsigned long end; unsigned long end;
...@@ -176,7 +176,7 @@ static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr) ...@@ -176,7 +176,7 @@ static int pmc551_erase (struct mtd_info *mtd, struct erase_info *instr)
static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf) static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf)
{ {
struct mypriv *priv = (struct mypriv *)mtd->priv; struct mypriv *priv = mtd->priv;
u32 soff_hi; u32 soff_hi;
u32 soff_lo; u32 soff_lo;
...@@ -217,7 +217,7 @@ static void pmc551_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, siz ...@@ -217,7 +217,7 @@ static void pmc551_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, siz
static int pmc551_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) static int pmc551_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf)
{ {
struct mypriv *priv = (struct mypriv *)mtd->priv; struct mypriv *priv = mtd->priv;
u32 soff_hi, soff_lo; /* start address offset hi/lo */ u32 soff_hi, soff_lo; /* start address offset hi/lo */
u32 eoff_hi, eoff_lo; /* end address offset hi/lo */ u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
unsigned long end; unsigned long end;
...@@ -279,7 +279,7 @@ static int pmc551_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *r ...@@ -279,7 +279,7 @@ static int pmc551_read (struct mtd_info *mtd, loff_t from, size_t len, size_t *r
static int pmc551_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) static int pmc551_write (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
{ {
struct mypriv *priv = (struct mypriv *)mtd->priv; struct mypriv *priv = mtd->priv;
u32 soff_hi, soff_lo; /* start address offset hi/lo */ u32 soff_hi, soff_lo; /* start address offset hi/lo */
u32 eoff_hi, eoff_lo; /* end address offset hi/lo */ u32 eoff_hi, eoff_lo; /* end address offset hi/lo */
unsigned long end; unsigned long end;
...@@ -820,7 +820,7 @@ static void __exit cleanup_pmc551(void) ...@@ -820,7 +820,7 @@ static void __exit cleanup_pmc551(void)
struct mypriv *priv; struct mypriv *priv;
while((mtd=pmc551list)) { while((mtd=pmc551list)) {
priv = (struct mypriv *)mtd->priv; priv = mtd->priv;
pmc551list = priv->nextpmc551; pmc551list = priv->nextpmc551;
if(priv->start) { if(priv->start) {
......
/*====================================================================== /*======================================================================
$Id: slram.c,v 1.32 2004/11/16 18:29:01 dwmw2 Exp $ $Id: slram.c,v 1.33 2005/01/05 18:05:13 dwmw2 Exp $
This driver provides a method to access memory not used by the kernel This driver provides a method to access memory not used by the kernel
itself (i.e. if the kernel commandline mem=xxx is used). To actually itself (i.e. if the kernel commandline mem=xxx is used). To actually
...@@ -106,7 +106,7 @@ static int slram_erase(struct mtd_info *mtd, struct erase_info *instr) ...@@ -106,7 +106,7 @@ static int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
static int slram_point(struct mtd_info *mtd, loff_t from, size_t len, static int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char **mtdbuf) size_t *retlen, u_char **mtdbuf)
{ {
slram_priv_t *priv = (slram_priv_t *)mtd->priv; slram_priv_t *priv = mtd->priv;
*mtdbuf = priv->start + from; *mtdbuf = priv->start + from;
*retlen = len; *retlen = len;
...@@ -120,7 +120,7 @@ static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_ ...@@ -120,7 +120,7 @@ static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_
static int slram_read(struct mtd_info *mtd, loff_t from, size_t len, static int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char *buf) size_t *retlen, u_char *buf)
{ {
slram_priv_t *priv = (slram_priv_t *)mtd->priv; slram_priv_t *priv = mtd->priv;
memcpy(buf, priv->start + from, len); memcpy(buf, priv->start + from, len);
...@@ -131,7 +131,7 @@ static int slram_read(struct mtd_info *mtd, loff_t from, size_t len, ...@@ -131,7 +131,7 @@ static int slram_read(struct mtd_info *mtd, loff_t from, size_t len,
static int slram_write(struct mtd_info *mtd, loff_t to, size_t len, static int slram_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf) size_t *retlen, const u_char *buf)
{ {
slram_priv_t *priv = (slram_priv_t *)mtd->priv; slram_priv_t *priv = mtd->priv;
memcpy(priv->start + to, buf, len); memcpy(priv->start + to, buf, len);
...@@ -161,7 +161,7 @@ static int register_device(char *name, unsigned long start, unsigned long length ...@@ -161,7 +161,7 @@ static int register_device(char *name, unsigned long start, unsigned long length
if ((*curmtd)->mtdinfo) { if ((*curmtd)->mtdinfo) {
memset((char *)(*curmtd)->mtdinfo, 0, sizeof(struct mtd_info)); memset((char *)(*curmtd)->mtdinfo, 0, sizeof(struct mtd_info));
(*curmtd)->mtdinfo->priv = (*curmtd)->mtdinfo->priv =
(void *)kmalloc(sizeof(slram_priv_t), GFP_KERNEL); kmalloc(sizeof(slram_priv_t), GFP_KERNEL);
if (!(*curmtd)->mtdinfo->priv) { if (!(*curmtd)->mtdinfo->priv) {
kfree((*curmtd)->mtdinfo); kfree((*curmtd)->mtdinfo);
......
/* /*
* $Id: ocelot.c,v 1.15 2004/11/04 13:24:15 gleixner Exp $ * $Id: ocelot.c,v 1.16 2005/01/05 18:05:13 dwmw2 Exp $
* *
* Flash on Momenco Ocelot * Flash on Momenco Ocelot
*/ */
...@@ -28,7 +28,7 @@ static struct mtd_info *nvram_mtd; ...@@ -28,7 +28,7 @@ static struct mtd_info *nvram_mtd;
static void ocelot_ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf) static void ocelot_ram_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf)
{ {
struct map_info *map = (struct map_info *)mtd->priv; struct map_info *map = mtd->priv;
size_t done = 0; size_t done = 0;
/* If we use memcpy, it does word-wide writes. Even though we told the /* If we use memcpy, it does word-wide writes. Even though we told the
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com) * (C) Copyright 2002, Greg Ungerer (gerg@snapgear.com)
* *
* $Id: uclinux.c,v 1.9 2004/11/04 13:24:15 gleixner Exp $ * $Id: uclinux.c,v 1.10 2005/01/05 18:05:13 dwmw2 Exp $
*/ */
/****************************************************************************/ /****************************************************************************/
...@@ -47,7 +47,7 @@ struct mtd_partition uclinux_romfs[] = { ...@@ -47,7 +47,7 @@ struct mtd_partition uclinux_romfs[] = {
int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len, int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, u_char **mtdbuf) size_t *retlen, u_char **mtdbuf)
{ {
struct map_info *map = (struct map_info *) mtd->priv; struct map_info *map = mtd->priv;
*mtdbuf = (u_char *) (map->virt + ((int) from)); *mtdbuf = (u_char *) (map->virt + ((int) from));
*retlen = len; *retlen = len;
return(0); return(0);
...@@ -81,7 +81,7 @@ int __init uclinux_mtd_init(void) ...@@ -81,7 +81,7 @@ int __init uclinux_mtd_init(void)
mtd = do_map_probe("map_ram", mapp); mtd = do_map_probe("map_ram", mapp);
if (!mtd) { if (!mtd) {
printk("uclinux[mtd]: failed to find a mapping?\n"); printk("uclinux[mtd]: failed to find a mapping?\n");
iounmap((void *) mapp->virt); iounmap(mapp->virt);
return(-ENXIO); return(-ENXIO);
} }
......
/* /*
* $Id: mtdchar.c,v 1.65 2004/09/23 23:45:47 gleixner Exp $ * $Id: mtdchar.c,v 1.66 2005/01/05 18:05:11 dwmw2 Exp $
* *
* Character-device access to raw MTD devices. * Character-device access to raw MTD devices.
* *
...@@ -61,7 +61,7 @@ static inline void mtdchar_devfs_exit(void) ...@@ -61,7 +61,7 @@ static inline void mtdchar_devfs_exit(void)
static loff_t mtd_lseek (struct file *file, loff_t offset, int orig) static loff_t mtd_lseek (struct file *file, loff_t offset, int orig)
{ {
struct mtd_info *mtd=(struct mtd_info *)file->private_data; struct mtd_info *mtd = file->private_data;
switch (orig) { switch (orig) {
case 0: case 0:
...@@ -134,7 +134,7 @@ static int mtd_close(struct inode *inode, struct file *file) ...@@ -134,7 +134,7 @@ static int mtd_close(struct inode *inode, struct file *file)
DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n"); DEBUG(MTD_DEBUG_LEVEL0, "MTD_close\n");
mtd = (struct mtd_info *)file->private_data; mtd = file->private_data;
if (mtd->sync) if (mtd->sync)
mtd->sync(mtd); mtd->sync(mtd);
...@@ -151,7 +151,7 @@ static int mtd_close(struct inode *inode, struct file *file) ...@@ -151,7 +151,7 @@ static int mtd_close(struct inode *inode, struct file *file)
static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t *ppos) static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t *ppos)
{ {
struct mtd_info *mtd = (struct mtd_info *)file->private_data; struct mtd_info *mtd = file->private_data;
size_t retlen=0; size_t retlen=0;
size_t total_retlen=0; size_t total_retlen=0;
int ret=0; int ret=0;
...@@ -210,7 +210,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t ...@@ -210,7 +210,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t
static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count,loff_t *ppos) static ssize_t mtd_write(struct file *file, const char __user *buf, size_t count,loff_t *ppos)
{ {
struct mtd_info *mtd = (struct mtd_info *)file->private_data; struct mtd_info *mtd = file->private_data;
char *kbuf; char *kbuf;
size_t retlen; size_t retlen;
size_t total_retlen=0; size_t total_retlen=0;
...@@ -276,7 +276,7 @@ static void mtdchar_erase_callback (struct erase_info *instr) ...@@ -276,7 +276,7 @@ static void mtdchar_erase_callback (struct erase_info *instr)
static int mtd_ioctl(struct inode *inode, struct file *file, static int mtd_ioctl(struct inode *inode, struct file *file,
u_int cmd, u_long arg) u_int cmd, u_long arg)
{ {
struct mtd_info *mtd = (struct mtd_info *)file->private_data; struct mtd_info *mtd = file->private_data;
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int ret = 0; int ret = 0;
u_long size; u_long size;
......
This diff is collapsed.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* 28-Sep-2004 BJD Fixed ECC placement for Hardware mode * 28-Sep-2004 BJD Fixed ECC placement for Hardware mode
* 12-Oct-2004 BJD Fixed errors in use of platform data * 12-Oct-2004 BJD Fixed errors in use of platform data
* *
* $Id: s3c2410.c,v 1.6 2004/11/24 12:25:48 bjd Exp $ * $Id: s3c2410.c,v 1.7 2005/01/05 18:05:14 dwmw2 Exp $
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -117,12 +117,12 @@ static struct s3c2410_nand_info *s3c2410_nand_mtd_toinfo(struct mtd_info *mtd) ...@@ -117,12 +117,12 @@ static struct s3c2410_nand_info *s3c2410_nand_mtd_toinfo(struct mtd_info *mtd)
static struct s3c2410_nand_info *to_nand_info(struct device *dev) static struct s3c2410_nand_info *to_nand_info(struct device *dev)
{ {
return (struct s3c2410_nand_info *)dev_get_drvdata(dev); return dev_get_drvdata(dev);
} }
static struct s3c2410_platform_nand *to_nand_plat(struct device *dev) static struct s3c2410_platform_nand *to_nand_plat(struct device *dev)
{ {
return (struct s3c2410_platform_nand *)dev->platform_data; return dev->platform_data;
} }
/* timing calculations */ /* timing calculations */
...@@ -205,7 +205,7 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip) ...@@ -205,7 +205,7 @@ static void s3c2410_nand_select_chip(struct mtd_info *mtd, int chip)
struct nand_chip *this = mtd->priv; struct nand_chip *this = mtd->priv;
unsigned long cur; unsigned long cur;
nmtd = (struct s3c2410_nand_mtd *)this->priv; nmtd = this->priv;
info = nmtd->info; info = nmtd->info;
cur = readl(info->regs + S3C2410_NFCONF); cur = readl(info->regs + S3C2410_NFCONF);
...@@ -424,14 +424,14 @@ static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, ...@@ -424,14 +424,14 @@ static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd,
static void s3c2410_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) static void s3c2410_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
{ {
struct nand_chip *this = (struct nand_chip *)mtd->priv; struct nand_chip *this = mtd->priv;
readsb(this->IO_ADDR_R, buf, len); readsb(this->IO_ADDR_R, buf, len);
} }
static void s3c2410_nand_write_buf(struct mtd_info *mtd, static void s3c2410_nand_write_buf(struct mtd_info *mtd,
const u_char *buf, int len) const u_char *buf, int len)
{ {
struct nand_chip *this = (struct nand_chip *)mtd->priv; struct nand_chip *this = mtd->priv;
writesb(this->IO_ADDR_W, buf, len); writesb(this->IO_ADDR_W, buf, len);
} }
......
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