Merge remote branch 'origin' into secretlab/next-devicetree
[pandora-kernel.git] / drivers / mtd / nand / fsl_upm.c
index b7ab5a0..00aea6f 100644 (file)
@@ -49,7 +49,10 @@ struct fsl_upm_nand {
        uint32_t wait_flags;
 };
 
-#define to_fsl_upm_nand(mtd) container_of(mtd, struct fsl_upm_nand, mtd)
+static inline struct fsl_upm_nand *to_fsl_upm_nand(struct mtd_info *mtdinfo)
+{
+       return container_of(mtdinfo, struct fsl_upm_nand, mtd);
+}
 
 static int fun_chip_ready(struct mtd_info *mtd)
 {
@@ -303,7 +306,7 @@ static int __devinit fun_probe(struct of_device *ofdev,
                                  FSL_UPM_WAIT_WRITE_BYTE;
 
        fun->io_base = devm_ioremap_nocache(&ofdev->dev, io_res.start,
-                                           io_res.end - io_res.start + 1);
+                                           resource_size(&io_res));
        if (!fun->io_base) {
                ret = -ENOMEM;
                goto err2;
@@ -350,7 +353,7 @@ static int __devexit fun_remove(struct of_device *ofdev)
        return 0;
 }
 
-static struct of_device_id of_fun_match[] = {
+static const struct of_device_id of_fun_match[] = {
        { .compatible = "fsl,upm-nand" },
        {},
 };