unsigned long flags;
int retval;
+ might_sleep_if(!(rpmflags & RPM_ASYNC));
+
if (rpmflags & RPM_GET_PUT) {
if (!atomic_dec_and_test(&dev->power.usage_count))
return 0;
unsigned long flags;
int retval;
+ might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe);
+
if (rpmflags & RPM_GET_PUT) {
if (!atomic_dec_and_test(&dev->power.usage_count))
return 0;
unsigned long flags;
int retval;
+ might_sleep_if(!(rpmflags & RPM_ASYNC) && !dev->power.irq_safe);
+
if (rpmflags & RPM_GET_PUT)
atomic_inc(&dev->power.usage_count);
*/
void __pm_runtime_disable(struct device *dev, bool check_resume)
{
+ might_sleep();
spin_lock_irq(&dev->power.lock);
if (dev->power.disable_depth > 0) {
{
int old_delay, old_use;
+ might_sleep();
+
spin_lock_irq(&dev->power.lock);
old_delay = dev->power.autosuspend_delay;
old_use = dev->power.use_autosuspend;