aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/fsl_upm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/fsl_upm.c')
-rw-r--r--drivers/mtd/nand/fsl_upm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 4b96296af321..2d215ccb564d 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -49,7 +49,10 @@ struct fsl_upm_nand {
49 uint32_t wait_flags; 49 uint32_t wait_flags;
50}; 50};
51 51
52#define to_fsl_upm_nand(mtd) container_of(mtd, struct fsl_upm_nand, mtd) 52static inline struct fsl_upm_nand *to_fsl_upm_nand(struct mtd_info *mtdinfo)
53{
54 return container_of(mtdinfo, struct fsl_upm_nand, mtd);
55}
53 56
54static int fun_chip_ready(struct mtd_info *mtd) 57static int fun_chip_ready(struct mtd_info *mtd)
55{ 58{
@@ -303,7 +306,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
303 FSL_UPM_WAIT_WRITE_BYTE; 306 FSL_UPM_WAIT_WRITE_BYTE;
304 307
305 fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start, 308 fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start,
306 io_res.end - io_res.start + 1); 309 resource_size(&io_res));
307 if (!fun->io_base) { 310 if (!fun->io_base) {
308 ret = -ENOMEM; 311 ret = -ENOMEM;
309 goto err2; 312 goto err2;
@@ -350,7 +353,7 @@ static int __devexit fun_remove(struct of_device *ofdev)
350 return 0; 353 return 0;
351} 354}
352 355
353static struct of_device_id of_fun_match[] = { 356static const struct of_device_id of_fun_match[] = {
354 { .compatible = "fsl,upm-nand" }, 357 { .compatible = "fsl,upm-nand" },
355 {}, 358 {},
356}; 359};