diff options
author | Marc Gonzalez <marc_gonzalez@sigmadesigns.com> | 2016-11-15 05:08:19 -0500 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-11-19 03:43:12 -0500 |
commit | 37871abdd5ea73bde645c8f3d2e9fc04b5ffaf6b (patch) | |
tree | cbff02d699873392424bbfbb4db18e6b8c5313f5 | |
parent | ff9e9eae0f50ab3f7d1763677b62db4a2ed24a88 (diff) |
mtd: nand: tango: Cleanup raw_write and raw_read
Drop raw_write return value (no longer used).
Drop raw_read return value (for symmetry).
Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
-rw-r--r-- | drivers/mtd/nand/tango_nand.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/tango_nand.c index bacc2a02b7fe..7ed35348993e 100644 --- a/drivers/mtd/nand/tango_nand.c +++ b/drivers/mtd/nand/tango_nand.c | |||
@@ -343,7 +343,7 @@ static void aux_write(struct nand_chip *chip, const u8 **buf, int len, int *pos) | |||
343 | * buf = | PKT_0 | ... | PKT_N | | 343 | * buf = | PKT_0 | ... | PKT_N | |
344 | * +-----------------+-----+-----------------+ | 344 | * +-----------------+-----+-----------------+ |
345 | */ | 345 | */ |
346 | static int raw_read(struct nand_chip *chip, u8 *buf, u8 *oob) | 346 | static void raw_read(struct nand_chip *chip, u8 *buf, u8 *oob) |
347 | { | 347 | { |
348 | u8 *oob_orig = oob; | 348 | u8 *oob_orig = oob; |
349 | const int page_size = chip->mtd.writesize; | 349 | const int page_size = chip->mtd.writesize; |
@@ -367,11 +367,9 @@ static int raw_read(struct nand_chip *chip, u8 *buf, u8 *oob) | |||
367 | aux_read(chip, &oob_orig, BBM_SIZE, &pos); | 367 | aux_read(chip, &oob_orig, BBM_SIZE, &pos); |
368 | aux_read(chip, &buf, pkt_size - rem, &pos); | 368 | aux_read(chip, &buf, pkt_size - rem, &pos); |
369 | aux_read(chip, &oob, ecc_size, &pos); | 369 | aux_read(chip, &oob, ecc_size, &pos); |
370 | |||
371 | return 0; | ||
372 | } | 370 | } |
373 | 371 | ||
374 | static int raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob) | 372 | static void raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob) |
375 | { | 373 | { |
376 | const u8 *oob_orig = oob; | 374 | const u8 *oob_orig = oob; |
377 | const int page_size = chip->mtd.writesize; | 375 | const int page_size = chip->mtd.writesize; |
@@ -395,15 +393,14 @@ static int raw_write(struct nand_chip *chip, const u8 *buf, const u8 *oob) | |||
395 | aux_write(chip, &oob_orig, BBM_SIZE, &pos); | 393 | aux_write(chip, &oob_orig, BBM_SIZE, &pos); |
396 | aux_write(chip, &buf, pkt_size - rem, &pos); | 394 | aux_write(chip, &buf, pkt_size - rem, &pos); |
397 | aux_write(chip, &oob, ecc_size, &pos); | 395 | aux_write(chip, &oob, ecc_size, &pos); |
398 | |||
399 | return 0; | ||
400 | } | 396 | } |
401 | 397 | ||
402 | static int tango_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | 398 | static int tango_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, |
403 | u8 *buf, int oob_required, int page) | 399 | u8 *buf, int oob_required, int page) |
404 | { | 400 | { |
405 | chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); | 401 | chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); |
406 | return raw_read(chip, buf, chip->oob_poi); | 402 | raw_read(chip, buf, chip->oob_poi); |
403 | return 0; | ||
407 | } | 404 | } |
408 | 405 | ||
409 | static int tango_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, | 406 | static int tango_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip, |
@@ -419,7 +416,8 @@ static int tango_read_oob(struct mtd_info *mtd, struct nand_chip *chip, | |||
419 | int page) | 416 | int page) |
420 | { | 417 | { |
421 | chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); | 418 | chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page); |
422 | return raw_read(chip, NULL, chip->oob_poi); | 419 | raw_read(chip, NULL, chip->oob_poi); |
420 | return 0; | ||
423 | } | 421 | } |
424 | 422 | ||
425 | static int tango_write_oob(struct mtd_info *mtd, struct nand_chip *chip, | 423 | static int tango_write_oob(struct mtd_info *mtd, struct nand_chip *chip, |