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/sym53c500_cs.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/sym53c500_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/sym53c500_cs.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c index 42d002b6d1a5..4a6988567de5 100644 --- a/drivers/scsi/pcmcia/sym53c500_cs.c +++ b/drivers/scsi/pcmcia/sym53c500_cs.c | |||
@@ -857,26 +857,12 @@ cs_failed: | |||
857 | return; | 857 | return; |
858 | } /* SYM53C500_config */ | 858 | } /* SYM53C500_config */ |
859 | 859 | ||
860 | static int sym53c500_suspend(struct pcmcia_device *dev) | ||
861 | { | ||
862 | dev_link_t *link = dev_to_instance(dev); | ||
863 | |||
864 | link->state |= DEV_SUSPEND; | ||
865 | if (link->state & DEV_CONFIG) | ||
866 | pcmcia_release_configuration(link->handle); | ||
867 | |||
868 | return 0; | ||
869 | } | ||
870 | |||
871 | static int sym53c500_resume(struct pcmcia_device *dev) | 860 | static int sym53c500_resume(struct pcmcia_device *dev) |
872 | { | 861 | { |
873 | dev_link_t *link = dev_to_instance(dev); | 862 | dev_link_t *link = dev_to_instance(dev); |
874 | struct scsi_info_t *info = link->priv; | 863 | struct scsi_info_t *info = link->priv; |
875 | 864 | ||
876 | link->state &= ~DEV_SUSPEND; | ||
877 | if (link->state & DEV_CONFIG) { | 865 | if (link->state & DEV_CONFIG) { |
878 | pcmcia_request_configuration(link->handle, &link->conf); | ||
879 | |||
880 | /* See earlier comment about manufacturer IDs. */ | 866 | /* See earlier comment about manufacturer IDs. */ |
881 | if ((info->manf_id == MANFID_MACNICA) || | 867 | if ((info->manf_id == MANFID_MACNICA) || |
882 | (info->manf_id == MANFID_PIONEER) || | 868 | (info->manf_id == MANFID_PIONEER) || |
@@ -963,7 +949,6 @@ static struct pcmcia_driver sym53c500_cs_driver = { | |||
963 | .probe = SYM53C500_attach, | 949 | .probe = SYM53C500_attach, |
964 | .remove = SYM53C500_detach, | 950 | .remove = SYM53C500_detach, |
965 | .id_table = sym53c500_ids, | 951 | .id_table = sym53c500_ids, |
966 | .suspend = sym53c500_suspend, | ||
967 | .resume = sym53c500_resume, | 952 | .resume = sym53c500_resume, |
968 | }; | 953 | }; |
969 | 954 | ||