mtd: remove R/O checking duplication
Many drivers check whether the partition is R/O and return -EROFS if yes. Let's stop having duplicated checks and move them to the API functions instead. And again a bit of noise - deleted few too sparse newlines, sorry. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:

committato da
David Woodhouse

parent
5def48982b
commit
664addc248
@@ -122,14 +122,10 @@ static int mapram_erase (struct mtd_info *mtd, struct erase_info *instr)
|
||||
unsigned long i;
|
||||
|
||||
allff = map_word_ff(map);
|
||||
|
||||
for (i=0; i<instr->len; i += map_bankwidth(map))
|
||||
map_write(map, allff, instr->addr + i);
|
||||
|
||||
instr->state = MTD_ERASE_DONE;
|
||||
|
||||
mtd_erase_callback(instr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user