public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* Q: suspend_late() semantics
@ 2007-08-25 23:40 Guennadi Liakhovetski
  2007-08-26 20:23 ` Alan Stern
  2007-08-27 10:02 ` Pavel Machek
  0 siblings, 2 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2007-08-25 23:40 UTC (permalink / raw)
  To: linux-pm

Hi

trying to understand when suspend_late gets called, I just wasn't quite 
sure if I got the following points right:

1. seems to be a typo in the comment above 
drivers/base/power/suspend.c::device_power_down() - the function walks the 
dpm_off list and not the dpm_off_irq list, as claimed in the comment

2. in device_suspend() in the same file - this test:

		if (!list_empty(&dev->power.entry)) {

is it to catch concurrent device removal, say, from device_pm_remove()?

Which would mean in normal case every device would be passed to bus_type's 
suspend_late() if it's implemented?

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Q: suspend_late() semantics
  2007-08-25 23:40 Q: suspend_late() semantics Guennadi Liakhovetski
@ 2007-08-26 20:23 ` Alan Stern
  2007-08-27 10:02 ` Pavel Machek
  1 sibling, 0 replies; 4+ messages in thread
From: Alan Stern @ 2007-08-26 20:23 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-pm

On Sun, 26 Aug 2007, Guennadi Liakhovetski wrote:

> Hi
> 
> trying to understand when suspend_late gets called, I just wasn't quite 
> sure if I got the following points right:
> 
> 1. seems to be a typo in the comment above 
> drivers/base/power/suspend.c::device_power_down() - the function walks the 
> dpm_off list and not the dpm_off_irq list, as claimed in the comment

Yes, it's a typo.

> 2. in device_suspend() in the same file - this test:
> 
> 		if (!list_empty(&dev->power.entry)) {
> 
> is it to catch concurrent device removal, say, from device_pm_remove()?

Yes.

> Which would mean in normal case every device would be passed to bus_type's 
> suspend_late() if it's implemented?

Yes.

Alan Stern

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Q: suspend_late() semantics
  2007-08-25 23:40 Q: suspend_late() semantics Guennadi Liakhovetski
  2007-08-26 20:23 ` Alan Stern
@ 2007-08-27 10:02 ` Pavel Machek
  2007-08-27 16:45   ` [PATCH] trivial: fix typo in comment in drivers/base/power/suspend.c Guennadi Liakhovetski
  1 sibling, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2007-08-27 10:02 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: linux-pm

On Sun 2007-08-26 01:40:24, Guennadi Liakhovetski wrote:
> Hi
> 
> trying to understand when suspend_late gets called, I just wasn't quite 
> sure if I got the following points right:
> 
> 1. seems to be a typo in the comment above 
> drivers/base/power/suspend.c::device_power_down() - the function walks the 
> dpm_off list and not the dpm_off_irq list, as claimed in the comment

Can you send the diff to akpm?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] trivial: fix typo in comment in drivers/base/power/suspend.c
  2007-08-27 10:02 ` Pavel Machek
@ 2007-08-27 16:45   ` Guennadi Liakhovetski
  0 siblings, 0 replies; 4+ messages in thread
From: Guennadi Liakhovetski @ 2007-08-27 16:45 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-pm, trivial

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

---

On Mon, 27 Aug 2007, Pavel Machek wrote:

> On Sun 2007-08-26 01:40:24, Guennadi Liakhovetski wrote:
> > Hi
> > 
> > trying to understand when suspend_late gets called, I just wasn't quite 
> > sure if I got the following points right:
> > 
> > 1. seems to be a typo in the comment above 
> > drivers/base/power/suspend.c::device_power_down() - the function walks the 
> > dpm_off list and not the dpm_off_irq list, as claimed in the comment
> 
> Can you send the diff to akpm?

I think the trivial address should be more appropriate:-)

Thanks
Guennadi

diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c
index 26df9b2..8fed79e 100644
--- a/drivers/base/power/suspend.c
+++ b/drivers/base/power/suspend.c
@@ -167,7 +167,7 @@ EXPORT_SYMBOL_GPL(device_suspend);
  *	device_power_down - Shut down special devices.
  *	@state:		Power state to enter.
  *
- *	Walk the dpm_off_irq list, calling ->power_down() for each device that
+ *	Walk the dpm_off list, calling ->power_down() for each device that
  *	couldn't power down the device with interrupts enabled. When we're
  *	done, power down system devices.
  */

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-27 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-25 23:40 Q: suspend_late() semantics Guennadi Liakhovetski
2007-08-26 20:23 ` Alan Stern
2007-08-27 10:02 ` Pavel Machek
2007-08-27 16:45   ` [PATCH] trivial: fix typo in comment in drivers/base/power/suspend.c Guennadi Liakhovetski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox