diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-14 15:21:18 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 17:59:02 -0500 |
commit | 98e4c28b7ec390c2dad6a4c69d69629c0f7e8b10 (patch) | |
tree | b3d46f0643352e541d6a39e6da09059687cf713d /drivers/pcmcia | |
parent | 63e7ebd06402951bc8863ba5b7bc9b9f42044849 (diff) |
[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>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/ds.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index b120794c03a9..a802c65c3534 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -951,6 +951,16 @@ static int send_event_callback(struct device *dev, void * _data) | |||
951 | if (p_dev->state & (CLIENT_UNBOUND|CLIENT_STALE)) | 951 | if (p_dev->state & (CLIENT_UNBOUND|CLIENT_STALE)) |
952 | return 0; | 952 | return 0; |
953 | 953 | ||
954 | if ((data->event == CS_EVENT_PM_SUSPEND) || | ||
955 | (data->event == CS_EVENT_RESET_PHYSICAL)) { | ||
956 | if (p_drv->suspend) | ||
957 | return p_drv->suspend(p_dev); | ||
958 | } else if ((data->event == CS_EVENT_PM_RESUME) || | ||
959 | (data->event == CS_EVENT_CARD_RESET)) { | ||
960 | if (p_drv->resume) | ||
961 | return p_drv->resume(p_dev); | ||
962 | } | ||
963 | |||
954 | if (p_drv->event) | 964 | if (p_drv->event) |
955 | return p_drv->event(data->event, data->priority, | 965 | return p_drv->event(data->event, data->priority, |
956 | &p_dev->event_callback_args); | 966 | &p_dev->event_callback_args); |