From eedce63bd69168bae81a6bfef7c5a1e62598b898 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 Apr 2015 09:18:31 -0600 Subject: [PATCH 1/3] SAMA5 EHCI: Remove unused variable from structure --- arch/arm/src/sama5/sam_ehci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/src/sama5/sam_ehci.c b/arch/arm/src/sama5/sam_ehci.c index 9dec514728..c237d79f1d 100644 --- a/arch/arm/src/sama5/sam_ehci.c +++ b/arch/arm/src/sama5/sam_ehci.c @@ -224,7 +224,6 @@ struct sam_rhport_s /* Root hub port status */ volatile bool connected; /* Connected to device */ - volatile bool lowspeed; /* Low speed device attached */ uint8_t rhpndx; /* Root hub port index */ struct sam_epinfo_s ep0; /* EP0 endpoint info */ @@ -2669,7 +2668,6 @@ static inline void sam_portsc_bottomhalf(void) rhpndx+1, g_ehci.pscwait); rhport->connected = false; - rhport->lowspeed = false; /* Are we bound to a class instance? */ From 4608544f655392b2316ee160285ffa5c17e974be Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 Apr 2015 09:26:18 -0600 Subject: [PATCH 2/3] time.h: Add localtime prototypes; NSH: Correct test for gmtime_r return value --- include/time.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/time.h b/include/time.h index 88f4606d5c..904022a766 100644 --- a/include/time.h +++ b/include/time.h @@ -96,8 +96,8 @@ #ifndef CONFIG_LIBC_LOCALTIME /* Local time is the same as gmtime in this implementation */ -#define localtime(c) gmtime(c) -#define localtime_r(c,r) gmtime_r(c,r) +# define localtime(c) gmtime(c) +# define localtime_r(c,r) gmtime_r(c,r) #endif /******************************************************************************** @@ -196,6 +196,10 @@ int clock_getres(clockid_t clockid, FAR struct timespec *res); time_t mktime(FAR struct tm *tp); FAR struct tm *gmtime(FAR const time_t *timer); FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result); +#ifdef CONFIG_LIBC_LOCALTIME +FAR struct tm *localtime(FAR const time_t *timer); +FAR struct tm *localtime_r(FAR const time_t *timer, FAR struct tm *result); +#endif size_t strftime(FAR char *s, size_t max, FAR const char *format, FAR const struct tm *tm); From bb2bffa626d8a33e54b01be035f0c5c6689986be Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 Apr 2015 09:27:52 -0600 Subject: [PATCH 3/3] Update ChangeLogs --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5f1d894bb7..28f3cf3d57 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10250,3 +10250,6 @@ (2015-04-18). * arch/arm/src/stm32/stm32_rtcounter.c: Now need to enable backup domain write access when setting the time. From Darcy Gong (2015-04-19). + * include/time.h: Add prototypes for localtime() and localtimer_r() + (2015-04-21). +