aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r--drivers/pcmcia/ds.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 488448a12b2f..4ab956843d86 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -391,6 +391,7 @@ static int pcmcia_device_probe(struct device * dev)
391 } 391 }
392 392
393 p_dev->p_state &= ~CLIENT_UNBOUND; 393 p_dev->p_state &= ~CLIENT_UNBOUND;
394 p_dev->handle = p_dev;
394 395
395 ret = p_drv->probe(p_dev); 396 ret = p_drv->probe(p_dev);
396 if (ret) 397 if (ret)
@@ -1039,12 +1040,10 @@ static int pcmcia_dev_suspend(struct device * dev, pm_message_t state)
1039 ret = p_drv->suspend(p_dev); 1040 ret = p_drv->suspend(p_dev);
1040 if (ret) 1041 if (ret)
1041 return ret; 1042 return ret;
1042 if (p_dev->instance) { 1043 p_dev->state |= DEV_SUSPEND;
1043 p_dev->instance->state |= DEV_SUSPEND; 1044 if ((p_dev->state & DEV_CONFIG) &&
1044 if ((p_dev->instance->state & DEV_CONFIG) && 1045 !(p_dev->state & DEV_SUSPEND_NORELEASE))
1045 !(p_dev->instance->state & DEV_SUSPEND_NORELEASE))
1046 pcmcia_release_configuration(p_dev); 1046 pcmcia_release_configuration(p_dev);
1047 }
1048 } 1047 }
1049 1048
1050 return 0; 1049 return 0;
@@ -1061,16 +1060,14 @@ static int pcmcia_dev_resume(struct device * dev)
1061 p_drv = to_pcmcia_drv(dev->driver); 1060 p_drv = to_pcmcia_drv(dev->driver);
1062 1061
1063 if (p_drv && p_drv->resume) { 1062 if (p_drv && p_drv->resume) {
1064 if (p_dev->instance) { 1063 p_dev->state &= ~DEV_SUSPEND;
1065 p_dev->instance->state &= ~DEV_SUSPEND; 1064 if ((p_dev->state & DEV_CONFIG) &&
1066 if ((p_dev->instance->state & DEV_CONFIG) && 1065 !(p_dev->state & DEV_SUSPEND_NORELEASE)){
1067 !(p_dev->instance->state & DEV_SUSPEND_NORELEASE)){
1068 ret = pcmcia_request_configuration(p_dev, 1066 ret = pcmcia_request_configuration(p_dev,
1069 &p_dev->instance->conf); 1067 &p_dev->conf);
1070 if (ret) 1068 if (ret)
1071 return ret; 1069 return ret;
1072 } 1070 }
1073 }
1074 return p_drv->resume(p_dev); 1071 return p_drv->resume(p_dev);
1075 } 1072 }
1076 1073