diff options
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 7 |
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 | ||
442 | static int dataflash_get_otp_info(struct mtd_info *mtd, | 442 | static 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 | ||
455 | static ssize_t otp_read(struct spi_device *spi, unsigned base, | 456 | static ssize_t otp_read(struct spi_device *spi, unsigned base, |