linux/drivers/mtd/devices
Artem Bityutskiy 0dd5235f51 mtd: harmonize mtd_point interface implementation
Some MTD drivers return -EINVAL if the 'phys' parameter is not NULL, trying to
convey that they cannot return the physical address. However, this is not very
logical because they still can return the virtual address ('virt'). But some
drivers (lpddr) just ignore the 'phys' parameter instead, which is a more
logical thing to do.

Let's harmonize this and:

1. Always initialize 'virt' and 'phys' to 'NULL' in 'mtd_point()'.
2. Do not return an error if the physical address cannot be found.

So as a result, all drivers will set 'phys' to 'NULL' if it is not supported.
None of the 'mtd_point()' users use 'phys' anyway, so this should not break
anything. I guess we could also just delete this parameter later.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2012-03-27 00:32:11 +01:00
..
block2mtd.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
doc2000.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
doc2001.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
doc2001plus.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
docecc.c mtd: spelling, capitalization, uniformity 2011-09-11 15:02:13 +03:00
docg3.c mtd: docg3: initialize writebufsize 2012-03-27 00:22:57 +01:00
docg3.h mtd: docg3: fixes and cleanups 2012-01-09 18:13:05 +00:00
docprobe.c mtd: docprobe: use kzalloc instead 2012-01-09 18:25:51 +00:00
Kconfig mtd: ST SPEAr: Add SMI driver for serial NOR flash 2012-03-27 00:14:16 +01:00
lart.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
m25p80.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
Makefile mtd: ST SPEAr: Add SMI driver for serial NOR flash 2012-03-27 00:14:16 +01:00
ms02-nv.c mtd: do not duplicate length and offset checks in drivers 2012-03-27 00:28:18 +01:00
ms02-nv.h MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
mtd_dataflash.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
mtdram.c mtd: harmonize mtd_point interface implementation 2012-03-27 00:32:11 +01:00
phram.c mtd: harmonize mtd_point interface implementation 2012-03-27 00:32:11 +01:00
pmc551.c mtd: harmonize mtd_point interface implementation 2012-03-27 00:32:11 +01:00
slram.c mtd: harmonize mtd_point interface implementation 2012-03-27 00:32:11 +01:00
spear_smi.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00
sst25l.c mtd: remove retlen zeroing duplication 2012-03-27 00:29:34 +01:00