Explorar el Código

mtd: fls_upm.c: use resource_size()

Use resource_size().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
H Hartley Sweeten hace 15 años
padre
commit
58e6a84dfb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      drivers/mtd/nand/fsl_upm.c

+ 1 - 1
drivers/mtd/nand/fsl_upm.c

@@ -302,7 +302,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;