nand adapted for kernel 3.9.2