On Mon, Sep 22, 2025 at 10:07:08AM -0600, Mathieu Poirier wrote:
>On Wed, Sep 17, 2025 at 09:19:13PM +0800, Peng Fan wrote:
>> The order of runtime PM API calls in the remove path is wrong.
>> pm_runtime_put() should be called before pm_runtime_disable(), per the
>> runtime PM guidelines.
>
>Where is this mentioned?  I have looked in [1] and couldn't find anything.
>
>[1]. Documentation/power/runtime_pm.rst
>

Per this API says:
int pm_runtime_disable(struct device *dev);`
- increment the device's 'power.disable_depth' field (if the value of that
  field was previously zero, this prevents subsystem-level runtime PM
  callbacks from being run for the device), make sure that all of the
  pending runtime PM operations on the device are either completed or
  canceled;

This implies that pm_runtime_put() should be called before pm_runtime_disable().

Thanks,
Peng

Reply via email to