On A1200, when phone goes to low power state, it will call cfi_intelext_suspend and cfi_intelext_resume in cfi_cmdset_0001.c not in cfi_cmdset_0001_mp.c.
I tried to hook mtd device suspend & resume, it is strange that mtd->priv->fldrv_priv is NULL in hook function, but it is available in original suspend & resume. Even I did this:
Then in /proc/kmsg I can see the mtd in original functions can get an available fldrv_priv (not NULL). But if I access fldrv_priv outside the original function it was always NULL.Code:hook_suspend(struct mtd_info *mtd) { // ((struct map_info*)mtd->priv)->fldrv_priv == NULL at here! return (*original_suspend(mtd); }
I am new to kernel module program, could anybody tell me why?
thanks