Messages in this thread |  | | Date | Sat, 10 Dec 2011 09:59:12 -0500 (EST) | | From | Alan Stern <> | | Subject | Re: [PATCH 2/4] PM: Run the driver callback directly if the subsystem one is not there |
| |
On Sat, 10 Dec 2011, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl> > > Make the PM core execute driver PM callbacks directly if the > corresponding subsystem callbacks are not present. > --- linux.orig/drivers/base/power/runtime.c > +++ linux/drivers/base/power/runtime.c > @@ -250,6 +250,9 @@ static int rpm_idle(struct device *dev, > else > callback = NULL; > > + if (!callback && dev->driver && dev->driver->pm) > + callback = dev->driver->pm->runtime_idle; > + > if (callback) > __rpm_callback(callback, dev); > > @@ -713,6 +716,12 @@ static int rpm_resume(struct device *dev > else > callback = NULL; > > + if (!callback && dev->driver && dev->driver->pm) > + callback = dev->driver->pm->runtime_suspend; > + > + if (!callback && dev->driver && dev->driver->pm) > + callback = dev->driver->pm->runtime_resume; > + > retval = rpm_callback(callback, dev); > if (retval) { > __update_runtime_status(dev, RPM_SUSPENDED);
Looks like part of that got added in the wrong place.
Alan Stern
|  |