Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
[linux-drm-fsl-dcu.git] / kernel / time / clocksource.c
index 74eca5939bd989af76da55213ed5ae634ed9f6bd..d9ef176c4e092eebf93acc31dd14dcbd362603c0 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/sysdev.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/sched.h> /* for spin_unlock_irq() using preempt_count() m68k */
 
 /* XXX - Would like a better way for initializing curr_clocksource */
 extern struct clocksource clocksource_jiffies;
@@ -156,7 +157,7 @@ int clocksource_register(struct clocksource *c)
        /* check if clocksource is already registered */
        if (is_registered_source(c)) {
                printk("register_clocksource: Cannot register %s. "
-                       "Already registered!", c->name);
+                      "Already registered!", c->name);
                ret = -EBUSY;
        } else {
                /* register it */
@@ -186,6 +187,7 @@ void clocksource_reselect(void)
 }
 EXPORT_SYMBOL(clocksource_reselect);
 
+#ifdef CONFIG_SYSFS
 /**
  * sysfs_show_current_clocksources - sysfs interface for current clocksource
  * @dev:       unused
@@ -275,10 +277,10 @@ sysfs_show_available_clocksources(struct sys_device *dev, char *buf)
  * Sysfs setup bits:
  */
 static SYSDEV_ATTR(current_clocksource, 0600, sysfs_show_current_clocksources,
-                       sysfs_override_clocksource);
+                  sysfs_override_clocksource);
 
 static SYSDEV_ATTR(available_clocksource, 0600,
-                       sysfs_show_available_clocksources, NULL);
+                  sysfs_show_available_clocksources, NULL);
 
 static struct sysdev_class clocksource_sysclass = {
        set_kset_name("clocksource"),
@@ -307,6 +309,7 @@ static int __init init_clocksource_sysfs(void)
 }
 
 device_initcall(init_clocksource_sysfs);
+#endif /* CONFIG_SYSFS */
 
 /**
  * boot_override_clocksource - boot clock override