Cc: Greg KH <gregkh@...>, Andrew Morton <akpm@...>, Len Brown <lenb@...>, Ingo Molnar <mingo@...>, ACPI Devel Maling List <linux-acpi@...>, LKML <linux-kernel@...>, pm list <linux-pm@...>
There's a window in lock_all_devices() when dpm_list_mtx isn't held.
We don't want device_pm_remove() taking an already-locked device off
the dpm_locked list at that time. So we do need to acquire dev->sem in
device_pm_remove().
I don't see anything wrong with it. All that will happen is that the
removal will start before the suspend and finish after the resume.
Alan Stern
--