Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71438
b: refs/heads/master
c: 2e19758
h: refs/heads/master
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Linus Torvalds committed Oct 19, 2007
1 parent ff4ef0b commit 80b69d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 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: 03ff17979c58a0b63b0fe30a373f41b719731bd2
refs/heads/master: 2e1975868ac9d41211fcaa6f2c5e44c4e7ff9e5b
22 changes: 7 additions & 15 deletions trunk/kernel/time/clocksource.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,12 @@ static inline void clocksource_resume_watchdog(void) { }
*/
void clocksource_resume(void)
{
struct list_head *tmp;
struct clocksource *cs;
unsigned long flags;

spin_lock_irqsave(&clocksource_lock, flags);

list_for_each(tmp, &clocksource_list) {
struct clocksource *cs;

cs = list_entry(tmp, struct clocksource, list);
list_for_each_entry(cs, &clocksource_list, list) {
if (cs->resume)
cs->resume();
}
Expand Down Expand Up @@ -369,7 +366,6 @@ static ssize_t sysfs_override_clocksource(struct sys_device *dev,
const char *buf, size_t count)
{
struct clocksource *ovr = NULL;
struct list_head *tmp;
size_t ret = count;
int len;

Expand All @@ -389,12 +385,11 @@ static ssize_t sysfs_override_clocksource(struct sys_device *dev,

len = strlen(override_name);
if (len) {
struct clocksource *cs;

ovr = clocksource_override;
/* try to select it: */
list_for_each(tmp, &clocksource_list) {
struct clocksource *cs;

cs = list_entry(tmp, struct clocksource, list);
list_for_each_entry(cs, &clocksource_list, list) {
if (strlen(cs->name) == len &&
!strcmp(cs->name, override_name))
ovr = cs;
Expand Down Expand Up @@ -422,14 +417,11 @@ static ssize_t sysfs_override_clocksource(struct sys_device *dev,
static ssize_t
sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
{
struct list_head *tmp;
struct clocksource *src;
char *curr = buf;

spin_lock_irq(&clocksource_lock);
list_for_each(tmp, &clocksource_list) {
struct clocksource *src;

src = list_entry(tmp, struct clocksource, list);
list_for_each_entry(src, &clocksource_list, list) {
curr += sprintf(curr, "%s ", src->name);
}
spin_unlock_irq(&clocksource_lock);
Expand Down

0 comments on commit 80b69d6

Please sign in to comment.