diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2005-08-11 13:13:46 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 14:15:30 -0500 |
commit | 2c92d755323514a12c367f52027fb1f53328fcd6 (patch) | |
tree | c2d036d9f5342588a7c7e7cac6731b102cf2a4cb /drivers/mtd | |
parent | e21f6c02f78351c4aae8510929ed794cd818d847 (diff) |
[MTD] Remove deprecated power management functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/mtdcore.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index dc86df18e94b..2c16e051c61a 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: mtdcore.c,v 1.45 2005/02/18 14:34:50 dedekind Exp $ | 2 | * $Id: mtdcore.c,v 1.46 2005/08/11 17:13:43 gleixner Exp $ |
3 | * | 3 | * |
4 | * Core registration and callback routines for MTD | 4 | * Core registration and callback routines for MTD |
5 | * drivers and users. | 5 | * drivers and users. |
@@ -297,39 +297,6 @@ EXPORT_SYMBOL(default_mtd_writev); | |||
297 | EXPORT_SYMBOL(default_mtd_readv); | 297 | EXPORT_SYMBOL(default_mtd_readv); |
298 | 298 | ||
299 | /*====================================================================*/ | 299 | /*====================================================================*/ |
300 | /* Power management code */ | ||
301 | |||
302 | #ifdef CONFIG_PM | ||
303 | |||
304 | #include <linux/pm.h> | ||
305 | |||
306 | static struct pm_dev *mtd_pm_dev = NULL; | ||
307 | |||
308 | static int mtd_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data) | ||
309 | { | ||
310 | int ret = 0, i; | ||
311 | |||
312 | if (down_trylock(&mtd_table_mutex)) | ||
313 | return -EAGAIN; | ||
314 | if (rqst == PM_SUSPEND) { | ||
315 | for (i = 0; ret == 0 && i < MAX_MTD_DEVICES; i++) { | ||
316 | if (mtd_table[i] && mtd_table[i]->suspend) | ||
317 | ret = mtd_table[i]->suspend(mtd_table[i]); | ||
318 | } | ||
319 | } else i = MAX_MTD_DEVICES-1; | ||
320 | |||
321 | if (rqst == PM_RESUME || ret) { | ||
322 | for ( ; i >= 0; i--) { | ||
323 | if (mtd_table[i] && mtd_table[i]->resume) | ||
324 | mtd_table[i]->resume(mtd_table[i]); | ||
325 | } | ||
326 | } | ||
327 | up(&mtd_table_mutex); | ||
328 | return ret; | ||
329 | } | ||
330 | #endif | ||
331 | |||
332 | /*====================================================================*/ | ||
333 | /* Support for /proc/mtd */ | 300 | /* Support for /proc/mtd */ |
334 | 301 | ||
335 | #ifdef CONFIG_PROC_FS | 302 | #ifdef CONFIG_PROC_FS |
@@ -388,22 +355,11 @@ static int __init init_mtd(void) | |||
388 | if ((proc_mtd = create_proc_entry( "mtd", 0, NULL ))) | 355 | if ((proc_mtd = create_proc_entry( "mtd", 0, NULL ))) |
389 | proc_mtd->read_proc = mtd_read_proc; | 356 | proc_mtd->read_proc = mtd_read_proc; |
390 | #endif | 357 | #endif |
391 | |||
392 | #ifdef CONFIG_PM | ||
393 | mtd_pm_dev = pm_register(PM_UNKNOWN_DEV, 0, mtd_pm_callback); | ||
394 | #endif | ||
395 | return 0; | 358 | return 0; |
396 | } | 359 | } |
397 | 360 | ||
398 | static void __exit cleanup_mtd(void) | 361 | static void __exit cleanup_mtd(void) |
399 | { | 362 | { |
400 | #ifdef CONFIG_PM | ||
401 | if (mtd_pm_dev) { | ||
402 | pm_unregister(mtd_pm_dev); | ||
403 | mtd_pm_dev = NULL; | ||
404 | } | ||
405 | #endif | ||
406 | |||
407 | #ifdef CONFIG_PROC_FS | 363 | #ifdef CONFIG_PROC_FS |
408 | if (proc_mtd) | 364 | if (proc_mtd) |
409 | remove_proc_entry( "mtd", NULL); | 365 | remove_proc_entry( "mtd", NULL); |