aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
authorChristian Riesch <christian.riesch@omicron.at>2014-01-28 03:29:44 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-03-11 01:42:28 -0400
commit4b78fc42f3e3f07687dc27efc1153d29e360afa1 (patch)
treeff6effdbac1d81ce1be3a77e97bb93362a938848 /drivers/mtd/devices
parent41bf1a24c1001f4d0d41a78e1ac575d2f14789d7 (diff)
mtd: Add a retlen parameter to _get_{fact,user}_prot_info
Signed-off-by: Christian Riesch <christian.riesch@omicron.at> Cc: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 8b278d2b15bb..a6fdbe83bad6 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -439,8 +439,8 @@ static int dataflash_write(struct mtd_info *mtd, loff_t to, size_t len,
439 439
440#ifdef CONFIG_MTD_DATAFLASH_OTP 440#ifdef CONFIG_MTD_DATAFLASH_OTP
441 441
442static int dataflash_get_otp_info(struct mtd_info *mtd, 442static int dataflash_get_otp_info(struct mtd_info *mtd, size_t len,
443 struct otp_info *info, size_t len) 443 size_t *retlen, struct otp_info *info)
444{ 444{
445 /* Report both blocks as identical: bytes 0..64, locked. 445 /* Report both blocks as identical: bytes 0..64, locked.
446 * Unless the user block changed from all-ones, we can't 446 * Unless the user block changed from all-ones, we can't
@@ -449,7 +449,8 @@ static int dataflash_get_otp_info(struct mtd_info *mtd,
449 info->start = 0; 449 info->start = 0;
450 info->length = 64; 450 info->length = 64;
451 info->locked = 1; 451 info->locked = 1;
452 return sizeof(*info); 452 *retlen = sizeof(*info);
453 return 0;
453} 454}
454 455
455static ssize_t otp_read(struct spi_device *spi, unsigned base, 456static ssize_t otp_read(struct spi_device *spi, unsigned base,