--- zzzz-none-000/linux-2.6.13.1/drivers/mtd/mtdcore.c 2005-09-10 02:42:58.000000000 +0000 +++ ohio-7170-487/linux-2.6.13.1/drivers/mtd/mtdcore.c 2006-11-06 16:02:03.000000000 +0000 @@ -201,15 +201,18 @@ ret = mtd_table[i]; } else if (num < MAX_MTD_DEVICES) { ret = mtd_table[num]; - if (mtd && mtd != ret) + if (mtd && mtd != ret) { ret = NULL; + } } - if (ret && !try_module_get(ret->owner)) + if (ret && !try_module_get(ret->owner)) { ret = NULL; + } - if (ret) + if (ret) { ret->usecount++; + } up(&mtd_table_mutex); return ret; @@ -410,7 +413,11 @@ #endif } +#if defined(CONFIG_MIPS_OHIO) || defined(CONFIG_MIPS_AR7) || defined(CONFIG_MIPS_UR8) +subsys_initcall(init_mtd); +#else /*--- #if defined(CONFIG_MIPS_OHIO) || defined(CONFIG_MIPS_AR7) || defined(CONFIG_MIPS_UR8) ---*/ module_init(init_mtd); +#endif /*--- #else ---*//*--- #if defined(CONFIG_MIPS_OHIO) || defined(CONFIG_MIPS_AR7) || defined(CONFIG_MIPS_UR8) ---*/ module_exit(cleanup_mtd);