Re: [PATCH] usb: Make use of ktime_* comparison functions

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

 



On Fri, 26 May 2017, Mariusz Skamra wrote:

> Start using ktime_* compare functions to make the code backportable.
> Now that may be a bit tricky due to recent change of ktime_t.
> 
> Signed-off-by: Mariusz Skamra <mariuszx.skamra@xxxxxxxxx>
> Acked-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxx>
> ---
>  drivers/usb/chipidea/otg_fsm.c | 8 ++++----
>  drivers/usb/host/ehci-timer.c  | 2 +-
>  drivers/usb/host/fotg210-hcd.c | 2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)

> diff --git a/drivers/usb/host/ehci-timer.c b/drivers/usb/host/ehci-timer.c
> index 3893b5b..0b6cdb7 100644
> --- a/drivers/usb/host/ehci-timer.c
> +++ b/drivers/usb/host/ehci-timer.c
> @@ -424,7 +424,7 @@ static enum hrtimer_restart ehci_hrtimer_func(struct hrtimer *t)
>  	 */
>  	now = ktime_get();
>  	for_each_set_bit(e, &events, EHCI_HRTIMER_NUM_EVENTS) {
> -		if (now >= ehci->hr_timeouts[e])
> +		if (ktime_compare(now, ehci->hr_timeouts[e]) >= 0)
>  			event_handlers[e](ehci);
>  		else
>  			ehci_enable_event(ehci, e, false);

For the EHCI portion:

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux