diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-12-31 13:56:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-01-02 11:47:49 +0100 |
commit | 7caf8009cc2ca3a13d564830e7fa3bdbc2a23d99 (patch) | |
tree | e3e048a4b880749b30faab514bcad2a1c3d1b392 /drivers/mtd/core.c | |
parent | 212145ee5ab7bcd471906cd9442fdc42ab5f2daf (diff) | |
download | barebox-7caf8009cc2ca3a13d564830e7fa3bdbc2a23d99.tar.gz barebox-7caf8009cc2ca3a13d564830e7fa3bdbc2a23d99.tar.xz |
mtd/core.c: fix MTDPGALG
introduced in commit f76ad819e4971094
drivers/mtd: cosmetic changes
it's supposed to the invert of the writesize - 1
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/core.c')
-rw-r--r-- | drivers/mtd/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c index 55d845d4c..f25863dad 100644 --- a/drivers/mtd/core.c +++ b/drivers/mtd/core.c @@ -49,7 +49,7 @@ static ssize_t mtd_read(struct cdev *cdev, void* buf, size_t count, } #define NOTALIGNED(x) (x & (mtd->writesize - 1)) != 0 -#define MTDPGALG(x) ((x) & (mtd->writesize - 1)) +#define MTDPGALG(x) ((x) & ~(mtd->writesize - 1)) #ifdef CONFIG_MTD_WRITE static int all_ff(const void *buf, int len) |