Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282893
b: refs/heads/master
c: 9cf075f
h: refs/heads/master
i:
  282891: cd2f5a1
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Jan 9, 2012
1 parent efce03c commit 3e2bea6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bea7fe031e5b81629f264f48335f1af74900f4b9
refs/heads/master: 9cf075f8656524abc44ad3ff2ec3834fe76f186f
9 changes: 9 additions & 0 deletions trunk/include/linux/mtd/mtd.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ static inline int mtd_erase(struct mtd_info *mtd, struct erase_info *instr)
static inline int mtd_point(struct mtd_info *mtd, loff_t from, size_t len,
size_t *retlen, void **virt, resource_size_t *phys)
{
*retlen = 0;
return mtd->point(mtd, from, len, retlen, virt, phys);
}

Expand Down Expand Up @@ -289,6 +290,7 @@ static inline int mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
static inline int mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
*retlen = 0;
return mtd->write(mtd, to, len, retlen, buf);
}

Expand All @@ -302,18 +304,21 @@ static inline int mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
static inline int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
size_t *retlen, const u_char *buf)
{
*retlen = 0;
return mtd->panic_write(mtd, to, len, retlen, buf);
}

static inline int mtd_read_oob(struct mtd_info *mtd, loff_t from,
struct mtd_oob_ops *ops)
{
ops->retlen = ops->oobretlen = 0;
return mtd->read_oob(mtd, from, ops);
}

static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to,
struct mtd_oob_ops *ops)
{
ops->retlen = ops->oobretlen = 0;
return mtd->write_oob(mtd, to, ops);
}

Expand All @@ -332,6 +337,7 @@ static inline int mtd_read_fact_prot_reg(struct mtd_info *mtd, loff_t from,
size_t len, size_t *retlen,
u_char *buf)
{
*retlen = 0;
return mtd->read_fact_prot_reg(mtd, from, len, retlen, buf);
}

Expand All @@ -346,13 +352,15 @@ static inline int mtd_read_user_prot_reg(struct mtd_info *mtd, loff_t from,
size_t len, size_t *retlen,
u_char *buf)
{
*retlen = 0;
return mtd->read_user_prot_reg(mtd, from, len, retlen, buf);
}

static inline int mtd_write_user_prot_reg(struct mtd_info *mtd, loff_t to,
size_t len, size_t *retlen,
u_char *buf)
{
*retlen = 0;
return mtd->write_user_prot_reg(mtd, to, len, retlen, buf);
}

Expand All @@ -369,6 +377,7 @@ static inline int mtd_lock_user_prot_reg(struct mtd_info *mtd, loff_t from,
static inline int mtd_writev(struct mtd_info *mtd, const struct kvec *vecs,
unsigned long count, loff_t to, size_t *retlen)
{
*retlen = 0;
return mtd->writev(mtd, vecs, count, to, retlen);
}

Expand Down

0 comments on commit 3e2bea6

Please sign in to comment.