[MTD] Only set partition suspend/resume method if parent not registered
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 5 Apr 2009 14:56:23 +0000 (07:56 -0700)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 26 May 2009 15:45:44 +0000 (16:45 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdpart.c

index 29675edb44b46180bb954ed520f3d329c451a83d..63d1cd2c17be3f08db82ab2a2c19faf57d891cff 100644 (file)
@@ -395,7 +395,7 @@ static struct mtd_part *add_one_partition(struct mtd_info *master,
                slave->mtd.get_fact_prot_info = part_get_fact_prot_info;
        if (master->sync)
                slave->mtd.sync = part_sync;
-       if (!partno && master->suspend && master->resume) {
+       if (!partno && !master->dev.class && master->suspend && master->resume) {
                        slave->mtd.suspend = part_suspend;
                        slave->mtd.resume = part_resume;
        }