Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2017 16:46:17 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321798 - head/sys/dev/iicbus
Message-ID:  <201707311646.v6VGkHif032508@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Mon Jul 31 16:46:16 2017
New Revision: 321798
URL: https://svnweb.freebsd.org/changeset/base/321798

Log:
  Restore a few rather important lines of code that got fumbled in r321746.

Modified:
  head/sys/dev/iicbus/ds1307.c

Modified: head/sys/dev/iicbus/ds1307.c
==============================================================================
--- head/sys/dev/iicbus/ds1307.c	Mon Jul 31 15:50:58 2017	(r321797)
+++ head/sys/dev/iicbus/ds1307.c	Mon Jul 31 16:46:16 2017	(r321798)
@@ -380,6 +380,10 @@ ds1307_settime(device_t dev, struct timespec *ts)
 	} else
 		pmflags = 0;
 
+	getnanotime(ts);
+	ts->tv_sec -= utc_offset();
+	clock_ts_to_ct(ts, &ct);
+
 	data[DS1307_SECS]    = TOBCD(ct.sec);
 	data[DS1307_MINS]    = TOBCD(ct.min);
 	data[DS1307_HOUR]    = TOBCD(ct.hour) | pmflags;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707311646.v6VGkHif032508>