summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdchar.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2011-12-29 10:39:20 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 18:26:17 +0000
commit27c151a5e52efaa46d0938984f2ef591bdcb6d5b (patch)
tree67866c01422a4f0c99192b0bc2db8f1968cd1f5b /drivers/mtd/mtdchar.c
parentb6de3d6cb63427178c4f1df88b81d1ceee637e6f (diff)
mtd: mtd->write_user_prot_reg directly
Instead, just call 'mtd_write_user_prot_reg()' and check the '-EOPNOTSUPP' return code. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r--drivers/mtd/mtdchar.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 4e8e5fbc1e13..25bbbc3aa665 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -310,10 +310,6 @@ static ssize_t mtdchar_write(struct file *file, const char __user *buf, size_t c
ret = -EROFS;
break;
case MTD_FILE_MODE_OTP_USER:
- if (!mtd->write_user_prot_reg) {
- ret = -EOPNOTSUPP;
- break;
- }
ret = mtd_write_user_prot_reg(mtd, *ppos, len,
&retlen, kbuf);
break;