]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: docg3: fix reading oob+data without correction
authorRobert Jarzmik <robert.jarzmik@free.fr>
Sat, 19 Nov 2011 15:02:47 +0000 (16:02 +0100)
committerArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Thu, 8 Dec 2011 21:49:54 +0000 (23:49 +0200)
commit8cc54dea8d221f936cabbcfaf97d5853a135bae9
treed0526cbb66057888de8bb6281c73e58ac99984f6
parent9edee216cd951a50e7d56f72ea82e7393ab85859
mtd: docg3: fix reading oob+data without correction

Fix the docg3 reads to be able to cope with all possible
data buffer / oob buffer / file mode combinations from
docg3_read_oob().
This especially ensures that raw reads do not use ECC
corrections, and AUTOOOB and PLACEOOB do use ECC
correction.

The approach is to empty docg3_read() and make it a wrapper
to docg3_read_oob(). As docg3_read_oob() handles all the
funny cases (no data buffer but oob buffer, data buffer but
no oob buffer, ...), docg3_read() is just a special use of
docg3_read_oob().

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Reviewed-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Mike Dunn <mikedunn@newsguy.com>
drivers/mtd/devices/docg3.c