physmap and pointless shutdown() function ?
Mike Frysinger
vapier.adi at gmail.com
Wed May 6 22:41:53 EDT 2009
waaaay back when power management support was added to the physmap.c
driver, it added the standard suspend/resume functions. no problem
there. but it also added a shutdown function which causes the flash
to suspend/resume when rebooting:
static void physmap_flash_shutdown(struct platform_device *dev)
{
struct physmap_flash_info *info = platform_get_drvdata(dev);
int i;
for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++)
if (info->mtd[i]->suspend && info->mtd[i]->resume)
if (info->mtd[i]->suspend(info->mtd[i]) == 0)
info->mtd[i]->resume(info->mtd[i]);
}
i cant see any point in doing this. it isnt like the flash has
buffers that need flushing, and if they did, using suspend/resume as a
hack for flushing sounds pretty broken to me.
seems to me the function should just be dropped completely.
-mike
More information about the linux-mtd
mailing list