diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-01 18:02:33 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:52 -0500 |
commit | 8661bb5b4af1849c1f5a4e80c4e275fd13c155d6 (patch) | |
tree | ad99d85ea8d6f5c4c99b93f869bfd412994fb4ee /drivers/scsi/pcmcia/fdomain_stub.c | |
parent | 50db3fdbbc98260fb538c1cc3f8cc597ba7bffe7 (diff) |
[PATCH] pcmcia: default suspend and resume handling
In all but one case, the suspend and resume functions of PCMCIA drivers
contain mostly of calls to pcmcia_release_configuration() and
pcmcia_request_configuration(). Therefore, move this code out of the
drivers and into the core.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/scsi/pcmcia/fdomain_stub.c')
-rw-r--r-- | drivers/scsi/pcmcia/fdomain_stub.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c index fb7221cf511f..20b9b27c60dd 100644 --- a/drivers/scsi/pcmcia/fdomain_stub.c +++ b/drivers/scsi/pcmcia/fdomain_stub.c | |||
@@ -220,26 +220,12 @@ static void fdomain_release(dev_link_t *link) | |||
220 | 220 | ||
221 | /*====================================================================*/ | 221 | /*====================================================================*/ |
222 | 222 | ||
223 | static int fdomain_suspend(struct pcmcia_device *dev) | ||
224 | { | ||
225 | dev_link_t *link = dev_to_instance(dev); | ||
226 | |||
227 | link->state |= DEV_SUSPEND; | ||
228 | if (link->state & DEV_CONFIG) | ||
229 | pcmcia_release_configuration(link->handle); | ||
230 | |||
231 | return 0; | ||
232 | } | ||
233 | |||
234 | static int fdomain_resume(struct pcmcia_device *dev) | 223 | static int fdomain_resume(struct pcmcia_device *dev) |
235 | { | 224 | { |
236 | dev_link_t *link = dev_to_instance(dev); | 225 | dev_link_t *link = dev_to_instance(dev); |
237 | 226 | ||
238 | link->state &= ~DEV_SUSPEND; | 227 | if (link->state & DEV_CONFIG) |
239 | if (link->state & DEV_CONFIG) { | ||
240 | pcmcia_request_configuration(link->handle, &link->conf); | ||
241 | fdomain_16x0_bus_reset(NULL); | 228 | fdomain_16x0_bus_reset(NULL); |
242 | } | ||
243 | 229 | ||
244 | return 0; | 230 | return 0; |
245 | } | 231 | } |
@@ -260,7 +246,6 @@ static struct pcmcia_driver fdomain_cs_driver = { | |||
260 | .probe = fdomain_attach, | 246 | .probe = fdomain_attach, |
261 | .remove = fdomain_detach, | 247 | .remove = fdomain_detach, |
262 | .id_table = fdomain_ids, | 248 | .id_table = fdomain_ids, |
263 | .suspend = fdomain_suspend, | ||
264 | .resume = fdomain_resume, | 249 | .resume = fdomain_resume, |
265 | }; | 250 | }; |
266 | 251 | ||