blk_pre_runtime_suspend - Pre runtime suspend check
2. SYNOPSIS ▲
int blk_pre_runtime_suspend(struct request_queue * q );
3. ARGUMENTS ▲
the queue of the device
4. DESCRIPTION ▲
This function will check if runtime suspend is allowed for the device by examining if there are any requests pending in the queue. If there are requests pending, the device can not be runtime suspended; otherwise, the queueAqs status will be updated to SUSPENDING and the driver can proceed to suspend the device.
For the not allowed case, we mark last busy for the device so that runtime PM core will try to autosuspend it some time later.
This function should be called near the start of the deviceAqs runtime_suspend callback.
5. RETURN ▲
0 - OK to runtime suspend the device -EBUSY - Device should not be runtime suspended
6. COPYRIGHT ▲