if (has_pci_pm)
                                retval = pci_set_power_state (dev, state);
+                       dev->dev.power.power_state = state;


No, we should use the dpm_set_power_state() function here instead,
right?

If it were exported, that would be an option. None of the dpm_*() functions are exported.

Plus, that normally needs to be called by
code that already holds dpm_sem, which would
be deadlocksville all over again.  (Not unlike
the one coming from removing devices that
disappear during a PM resume.)


Speaking of somewhat-unusable PM mechanisms, do you know what uses the suspend()/resume() callbacks in "struct device_driver"? Seems that busses have the responsibility for arranging proper device suspend/resume, not generic code.

- Dave





-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to