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>
This commit is contained in:
parent
b6de3d6cb6
commit
27c151a5e5
2 changed files with 2 additions and 4 deletions
|
@ -381,6 +381,8 @@ static inline int mtd_write_user_prot_reg(struct mtd_info *mtd, loff_t to,
|
|||
u_char *buf)
|
||||
{
|
||||
*retlen = 0;
|
||||
if (!mtd->write_user_prot_reg)
|
||||
return -EOPNOTSUPP;
|
||||
return mtd->write_user_prot_reg(mtd, to, len, retlen, buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue