Re: [PATCH 1/1] Added sleep support to UART

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

 



* Tony Lindgren <tony@xxxxxxxxxxx> [080609 22:11]:
> Hi,
> 
> Sorry for the delay on looking at this, it's looking pretty good in
> general. Few more mostly cosmetic comments below.

Here's one more comment:

> > --- a/arch/arm/mach-omap2/pm24xx.c
> > +++ b/arch/arm/mach-omap2/pm24xx.c
> >  	if (omap2_pm_debug) {
> >  		unsigned long long tmp;
> > -		u32 resume_time;
> > +		s64 resume_time;
> > +		struct timespec t;
> >  
> > -		resume_time = omap2_read_32k_sync_counter();
> > +		getnstimeofday(&t);
> > +		resume_time = timespec_to_ns(&t);
> >  		tmp = resume_time - sleep_time;
> > -		tmp *= 1000000;
> > -		omap2_pm_dump(0, 1, tmp / 32768);
> > +		omap2_pm_dump(0, 1, tmp / 1000);
> >  	}

You should make all these calculations using timespec_sub():

struct timespec ts1, ts2, ts_delta;
getnstimeofday(&ts1);
getnstimeofday(&ts2);
ts_delta = timespec_sub(&ts2, &ts1);

Regards,

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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux