aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/tmio_nand.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 10:25:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 10:25:43 -0400
commit05ec7dd8dd5aa42c22a49682e4a51cadd4166b7e (patch)
tree6370b43c0d8f324aa7421bbb5a647aa04ab5d747 /drivers/mtd/nand/tmio_nand.c
parentc316ba3b518bc35ce5aef5421135220389f4eb98 (diff)
parent8046112818b70329e930b1d4557ef0876c1ad2bb (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/tmio_nand.c')
-rw-r--r--drivers/mtd/nand/tmio_nand.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
index fa28f01ae009..3041d1f7ae3f 100644
--- a/drivers/mtd/nand/tmio_nand.c
+++ b/drivers/mtd/nand/tmio_nand.c
@@ -319,7 +319,7 @@ static int tmio_nand_correct_data(struct mtd_info *mtd, unsigned char *buf,
319 319
320static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) 320static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
321{ 321{
322 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; 322 struct mfd_cell *cell = dev_get_platdata(&dev->dev);
323 int ret; 323 int ret;
324 324
325 if (cell->enable) { 325 if (cell->enable) {
@@ -363,7 +363,7 @@ static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
363 363
364static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) 364static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
365{ 365{
366 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; 366 struct mfd_cell *cell = dev_get_platdata(&dev->dev);
367 367
368 tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE); 368 tmio_iowrite8(FCR_MODE_POWER_OFF, tmio->fcr + FCR_MODE);
369 if (cell->disable) 369 if (cell->disable)
@@ -372,7 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
372 372
373static int tmio_probe(struct platform_device *dev) 373static int tmio_probe(struct platform_device *dev)
374{ 374{
375 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; 375 struct mfd_cell *cell = dev_get_platdata(&dev->dev);
376 struct tmio_nand_data *data = cell->driver_data; 376 struct tmio_nand_data *data = cell->driver_data;
377 struct resource *fcr = platform_get_resource(dev, 377 struct resource *fcr = platform_get_resource(dev,
378 IORESOURCE_MEM, 0); 378 IORESOURCE_MEM, 0);
@@ -405,14 +405,14 @@ static int tmio_probe(struct platform_device *dev)
405 mtd->priv = nand_chip; 405 mtd->priv = nand_chip;
406 mtd->name = "tmio-nand"; 406 mtd->name = "tmio-nand";
407 407
408 tmio->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1); 408 tmio->ccr = ioremap(ccr->start, resource_size(ccr));
409 if (!tmio->ccr) { 409 if (!tmio->ccr) {
410 retval = -EIO; 410 retval = -EIO;
411 goto err_iomap_ccr; 411 goto err_iomap_ccr;
412 } 412 }
413 413
414 tmio->fcr_base = fcr->start & 0xfffff; 414 tmio->fcr_base = fcr->start & 0xfffff;
415 tmio->fcr = ioremap(fcr->start, fcr->end - fcr->start + 1); 415 tmio->fcr = ioremap(fcr->start, resource_size(fcr));
416 if (!tmio->fcr) { 416 if (!tmio->fcr) {
417 retval = -EIO; 417 retval = -EIO;
418 goto err_iomap_fcr; 418 goto err_iomap_fcr;
@@ -516,7 +516,7 @@ static int tmio_remove(struct platform_device *dev)
516#ifdef CONFIG_PM 516#ifdef CONFIG_PM
517static int tmio_suspend(struct platform_device *dev, pm_message_t state) 517static int tmio_suspend(struct platform_device *dev, pm_message_t state)
518{ 518{
519 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; 519 struct mfd_cell *cell = dev_get_platdata(&dev->dev);
520 520
521 if (cell->suspend) 521 if (cell->suspend)
522 cell->suspend(dev); 522 cell->suspend(dev);
@@ -527,7 +527,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state)
527 527
528static int tmio_resume(struct platform_device *dev) 528static int tmio_resume(struct platform_device *dev)
529{ 529{
530 struct mfd_cell *cell = (struct mfd_cell *)dev->dev.platform_data; 530 struct mfd_cell *cell = dev_get_platdata(&dev->dev);
531 531
532 /* FIXME - is this required or merely another attack of the broken 532 /* FIXME - is this required or merely another attack of the broken
533 * SHARP platform? Looks suspicious. 533 * SHARP platform? Looks suspicious.