blk_pm_runtime_init (9) - Linux Man Pages
blk_pm_runtime_init: Block layer runtime PM initialization routine
blk_pm_runtime_init - Block layer runtime PM initialization routine
void blk_pm_runtime_init(struct request_queue
*q, struct device *dev);
- the queue of the device
- the device the queue belongs to
Initialize runtime-PM-related fields for q and start auto suspend for dev. Drivers that want to take advantage of request-based runtime PM should call this function after dev has been initialized, and its request queue q has been allocated, and runtime PM for it can not happen yet(either due to disabled/forbidden or its usage_count > 0). In most cases, driver should call this function before any I/O has taken place.
This function takes care of setting up using auto suspend for the device, the autosuspend delay is set to -1 to make runtime suspend impossible until an updated value is either set by user or by driver. Drivers do not need to touch other autosuspend settings.