Re: [PATCH RFC V2 1/3] block: put runtime PM code into common helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  #ifdef CONFIG_PM
> +static int __blk_pre_runtime_suspend(struct request_queue *q, bool active)
> +{
> +	int ret;
> +
> +	if (active) {
> +		ret = -EBUSY;
> +		pm_runtime_mark_last_busy(q->dev);
> +	} else {
> +		ret = 0;
> +		q->rpm_status = RPM_SUSPENDING;
> +	}
> +
> +	return ret;
> +}

Why not:

	if (active) {
		pm_runtime_mark_last_busy(q->dev);
		return -EBUSY;
	}

	q->rpm_status = RPM_SUSPENDING;
	return 0;
		



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux