summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/mtd_dataflash.c
diff options
context:
space:
mode:
authorChristian Riesch2014-01-28 09:29:44 +0100
committerBrian Norris2014-03-11 06:42:28 +0100
commit4b78fc42f3e3f07687dc27efc1153d29e360afa1 (patch)
treeff6effdbac1d81ce1be3a77e97bb93362a938848 /drivers/mtd/devices/mtd_dataflash.c
parentjffs2: Fix crash due to truncation of csize (diff)
downloadkernel-qcow2-linux-4b78fc42f3e3f07687dc27efc1153d29e360afa1.tar.gz
kernel-qcow2-linux-4b78fc42f3e3f07687dc27efc1153d29e360afa1.tar.xz
kernel-qcow2-linux-4b78fc42f3e3f07687dc27efc1153d29e360afa1.zip
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/mtd_dataflash.c')
-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,
#ifdef CONFIG_MTD_DATAFLASH_OTP
-static int dataflash_get_otp_info(struct mtd_info *mtd,
- struct otp_info *info, size_t len)
+static int dataflash_get_otp_info(struct mtd_info *mtd, size_t len,
+ size_t *retlen, struct otp_info *info)
{
/* Report both blocks as identical: bytes 0..64, locked.
* 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,
info->start = 0;
info->length = 64;
info->locked = 1;
- return sizeof(*info);
+ *retlen = sizeof(*info);
+ return 0;
}
static ssize_t otp_read(struct spi_device *spi, unsigned base,