[PATCH] pcmcia: new suspend core

Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
This commit is contained in:
Dominik Brodowski
2005-11-14 21:21:18 +01:00
parent 63e7ebd064
commit 98e4c28b7e
45 changed files with 1434 additions and 994 deletions

View File

@ -951,6 +951,16 @@ static int send_event_callback(struct device *dev, void * _data)
if (p_dev->state & (CLIENT_UNBOUND|CLIENT_STALE))
return 0;
if ((data->event == CS_EVENT_PM_SUSPEND) ||
(data->event == CS_EVENT_RESET_PHYSICAL)) {
if (p_drv->suspend)
return p_drv->suspend(p_dev);
} else if ((data->event == CS_EVENT_PM_RESUME) ||
(data->event == CS_EVENT_CARD_RESET)) {
if (p_drv->resume)
return p_drv->resume(p_dev);
}
if (p_drv->event)
return p_drv->event(data->event, data->priority,
&p_dev->event_callback_args);