Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242729
b: refs/heads/master
c: e1a85b2
h: refs/heads/master
i:
  242727: f476a65
v: v3
  • Loading branch information
Rafael J. Wysocki committed Mar 23, 2011
1 parent d24ca03 commit 62f761d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3c6ea1b06c71b43f751b36bd99345369fe911af
refs/heads/master: e1a85b2c519551d4792180cdab4074d7e99bf2c9
27 changes: 8 additions & 19 deletions trunk/kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/sysdev.h>
#include <linux/syscore_ops.h>
#include <linux/clocksource.h>
#include <linux/jiffies.h>
#include <linux/time.h>
Expand Down Expand Up @@ -597,13 +597,12 @@ static struct timespec timekeeping_suspend_time;

/**
* timekeeping_resume - Resumes the generic timekeeping subsystem.
* @dev: unused
*
* This is for the generic clocksource timekeeping.
* xtime/wall_to_monotonic/jiffies/etc are
* still managed by arch specific suspend/resume code.
*/
static int timekeeping_resume(struct sys_device *dev)
static void timekeeping_resume(void)
{
unsigned long flags;
struct timespec ts;
Expand Down Expand Up @@ -632,11 +631,9 @@ static int timekeeping_resume(struct sys_device *dev)

/* Resume hrtimers */
hres_timers_resume();

return 0;
}

static int timekeeping_suspend(struct sys_device *dev, pm_message_t state)
static int timekeeping_suspend(void)
{
unsigned long flags;

Expand All @@ -654,26 +651,18 @@ static int timekeeping_suspend(struct sys_device *dev, pm_message_t state)
}

/* sysfs resume/suspend bits for timekeeping */
static struct sysdev_class timekeeping_sysclass = {
.name = "timekeeping",
static struct syscore_ops timekeeping_syscore_ops = {
.resume = timekeeping_resume,
.suspend = timekeeping_suspend,
};

static struct sys_device device_timer = {
.id = 0,
.cls = &timekeeping_sysclass,
};

static int __init timekeeping_init_device(void)
static int __init timekeeping_init_ops(void)
{
int error = sysdev_class_register(&timekeeping_sysclass);
if (!error)
error = sysdev_register(&device_timer);
return error;
register_syscore_ops(&timekeeping_syscore_ops);
return 0;
}

device_initcall(timekeeping_init_device);
device_initcall(timekeeping_init_ops);

/*
* If the error is already larger, we look ahead even further
Expand Down

0 comments on commit 62f761d

Please sign in to comment.