aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pnp/driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 12adb43a0693..a39ee38a9414 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -163,6 +163,13 @@ static int __pnp_bus_suspend(struct device *dev, pm_message_t state)
163 if (!pnp_drv) 163 if (!pnp_drv)
164 return 0; 164 return 0;
165 165
166 if (pnp_drv->driver.pm && pnp_drv->driver.pm->suspend) {
167 error = pnp_drv->driver.pm->suspend(dev);
168 suspend_report_result(pnp_drv->driver.pm->suspend, error);
169 if (error)
170 return error;
171 }
172
166 if (pnp_drv->suspend) { 173 if (pnp_drv->suspend) {
167 error = pnp_drv->suspend(pnp_dev, state); 174 error = pnp_drv->suspend(pnp_dev, state);
168 if (error) 175 if (error)
@@ -211,6 +218,12 @@ static int pnp_bus_resume(struct device *dev)
211 return error; 218 return error;
212 } 219 }
213 220
221 if (pnp_drv->driver.pm && pnp_drv->driver.pm->resume) {
222 error = pnp_drv->driver.pm->resume(dev);
223 if (error)
224 return error;
225 }
226
214 if (pnp_drv->resume) { 227 if (pnp_drv->resume) {
215 error = pnp_drv->resume(pnp_dev); 228 error = pnp_drv->resume(pnp_dev);
216 if (error) 229 if (error)