diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/tmio_nand.c | 11 | ||||
-rw-r--r-- | drivers/mtd/ubi/io.c | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index 3041d1f7ae3f..38fb16771f85 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 | ||
320 | static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) | 320 | static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio) |
321 | { | 321 | { |
322 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); | 322 | const struct mfd_cell *cell = mfd_get_cell(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 | ||
364 | static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) | 364 | static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) |
365 | { | 365 | { |
366 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); | 366 | const struct mfd_cell *cell = mfd_get_cell(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,8 +372,7 @@ static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio) | |||
372 | 372 | ||
373 | static int tmio_probe(struct platform_device *dev) | 373 | static int tmio_probe(struct platform_device *dev) |
374 | { | 374 | { |
375 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); | 375 | struct tmio_nand_data *data = mfd_get_data(dev); |
376 | struct tmio_nand_data *data = cell->driver_data; | ||
377 | struct resource *fcr = platform_get_resource(dev, | 376 | struct resource *fcr = platform_get_resource(dev, |
378 | IORESOURCE_MEM, 0); | 377 | IORESOURCE_MEM, 0); |
379 | struct resource *ccr = platform_get_resource(dev, | 378 | struct resource *ccr = platform_get_resource(dev, |
@@ -516,7 +515,7 @@ static int tmio_remove(struct platform_device *dev) | |||
516 | #ifdef CONFIG_PM | 515 | #ifdef CONFIG_PM |
517 | static int tmio_suspend(struct platform_device *dev, pm_message_t state) | 516 | static int tmio_suspend(struct platform_device *dev, pm_message_t state) |
518 | { | 517 | { |
519 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); | 518 | const struct mfd_cell *cell = mfd_get_cell(dev); |
520 | 519 | ||
521 | if (cell->suspend) | 520 | if (cell->suspend) |
522 | cell->suspend(dev); | 521 | cell->suspend(dev); |
@@ -527,7 +526,7 @@ static int tmio_suspend(struct platform_device *dev, pm_message_t state) | |||
527 | 526 | ||
528 | static int tmio_resume(struct platform_device *dev) | 527 | static int tmio_resume(struct platform_device *dev) |
529 | { | 528 | { |
530 | struct mfd_cell *cell = dev_get_platdata(&dev->dev); | 529 | const struct mfd_cell *cell = mfd_get_cell(dev); |
531 | 530 | ||
532 | /* FIXME - is this required or merely another attack of the broken | 531 | /* FIXME - is this required or merely another attack of the broken |
533 | * SHARP platform? Looks suspicious. | 532 | * SHARP platform? Looks suspicious. |
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index aaa6e1e83b29..eededf94f5a6 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c | |||
@@ -1345,7 +1345,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum, | |||
1345 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1345 | if (!(ubi_chk_flags & UBI_CHK_IO)) |
1346 | return 0; | 1346 | return 0; |
1347 | 1347 | ||
1348 | buf1 = __vmalloc(len, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); | 1348 | buf1 = __vmalloc(len, GFP_NOFS, PAGE_KERNEL); |
1349 | if (!buf1) { | 1349 | if (!buf1) { |
1350 | ubi_err("cannot allocate memory to check writes"); | 1350 | ubi_err("cannot allocate memory to check writes"); |
1351 | return 0; | 1351 | return 0; |
@@ -1409,7 +1409,7 @@ int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) | |||
1409 | if (!(ubi_chk_flags & UBI_CHK_IO)) | 1409 | if (!(ubi_chk_flags & UBI_CHK_IO)) |
1410 | return 0; | 1410 | return 0; |
1411 | 1411 | ||
1412 | buf = __vmalloc(len, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); | 1412 | buf = __vmalloc(len, GFP_NOFS, PAGE_KERNEL); |
1413 | if (!buf) { | 1413 | if (!buf) { |
1414 | ubi_err("cannot allocate memory to check for 0xFFs"); | 1414 | ubi_err("cannot allocate memory to check for 0xFFs"); |
1415 | return 0; | 1415 | return 0; |