From: Brian Norris Date: Tue, 25 Sep 2012 03:40:52 +0000 (-0700) Subject: mtd: nand: add generic READ ID length calculation functions X-Git-Tag: v3.7-rc1~70^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3b88bd604283ef83ae6e8f53622d5b1ffe9d43a;p=pandora-kernel.git mtd: nand: add generic READ ID length calculation functions When decoding the extended ID bytes of a NAND chip, we have to calculate the ID length according to some heuristic patterns (e.g., Does the ID wrap around? Does it end in trailing zeros?). Currently, these heuristics are built into complicated if/else blocks that can be hard to understand. Now, these checks can be done generically in a function, making them more robust and reusable. In fact, this sort of calculation is needed in future additions to nand_base.c. And with this advancement, we get the added benefit of a more readable "extended ID decode". Signed-off-by: Brian Norris Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- Reading git-diff-tree failed