Skip to content

Commit

Permalink
Lesson06: add/change some comments to module source code
Browse files Browse the repository at this point in the history
Signed-off-by: Oleg.Khokhlov <[email protected]>
  • Loading branch information
OlegH-ua committed Nov 13, 2018
1 parent 4d37222 commit df80387
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 06-TimeManagement/omod6_kern_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ static ssize_t ktime_show(struct class *cl,
sprintf(buf, "ktime (%u ticks, %u HZ):\n", (uint32_t)get_jiffies_64(), HZ);
sprintf(strchr(buf, 0), "%u module call\n", ModCallCount);
sprintf(strchr(buf, 0), "%u sec from last call\n", dT);
// sprintf(strchr(buf, 0), "%u sec curr abs time from Epoch (year:%d)\n", TS, 1970+TS/(3600*24*365));
rtc_time64_to_tm(TS, &tm);
//https://ru.wikipedia.org/wiki/Time.h
sprintf(strchr(buf, 0), "%u sec curr abs time from Epoch (%d.%02d.%02d, %02d:%02d:%02d)\n", TS,
Expand Down Expand Up @@ -161,6 +160,7 @@ static ssize_t ktime_store(struct class *cl,
}
} else {
unsigned long expired = get_jiffies_64() + interval * HZ / 1000;
//--- commented code is not needed - timer works without it ---
//if (timer_pending(&MyTimer)) {
// mod_timer_pending(&MyTimer, expired);
//} else {
Expand Down Expand Up @@ -218,5 +218,5 @@ module_exit(omod_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Oleg Khokhlov");
MODULE_DESCRIPTION("OlegH Lesson06 module: test kernel time funcs");
MODULE_VERSION("0.1");
MODULE_VERSION("0.2");

0 comments on commit df80387

Please sign in to comment.