]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/clock.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / clock.c
index bf6a10c5fc4ffdfd5f9abb74bec8da1c1140e57e..d13acd2e57bf0d1d6aee4a14e6700e2e056a0e68 100644 (file)
@@ -383,8 +383,11 @@ static int __init clk_disable_unused(void)
        unsigned long flags;
 
        list_for_each_entry(ck, &clocks, node) {
-               if (ck->usecount > 0 || (ck->flags & ALWAYS_ENABLED) ||
-                       ck->enable_reg == 0)
+               if (ck->usecount > 0 ||
+                   (ck->flags & (ALWAYS_ENABLED | PARENT_CONTROLS_CLOCK)))
+                       continue;
+
+               if (cpu_class_is_omap1() && ck->enable_reg == 0)
                        continue;
 
                spin_lock_irqsave(&clockfw_lock, flags);
@@ -428,23 +431,23 @@ static int clk_debugfs_register_one(struct clk *c)
        if (c->id != 0)
                sprintf(p, ":%d", c->id);
        d = debugfs_create_dir(s, pa ? pa->dent : clk_debugfs_root);
-       if (IS_ERR(d))
-               return PTR_ERR(d);
+       if (!d)
+               return -ENOMEM;
        c->dent = d;
 
        d = debugfs_create_u8("usecount", S_IRUGO, c->dent, (u8 *)&c->usecount);
-       if (IS_ERR(d)) {
-               err = PTR_ERR(d);
+       if (!d) {
+               err = -ENOMEM;
                goto err_out;
        }
        d = debugfs_create_u32("rate", S_IRUGO, c->dent, (u32 *)&c->rate);
-       if (IS_ERR(d)) {
-               err = PTR_ERR(d);
+       if (!d) {
+               err = -ENOMEM;
                goto err_out;
        }
        d = debugfs_create_x32("flags", S_IRUGO, c->dent, (u32 *)&c->flags);
-       if (IS_ERR(d)) {
-               err = PTR_ERR(d);
+       if (!d) {
+               err = -ENOMEM;
                goto err_out;
        }
        return 0;
@@ -483,8 +486,8 @@ static int __init clk_debugfs_init(void)
        int err;
 
        d = debugfs_create_dir("clock", NULL);
-       if (IS_ERR(d))
-               return PTR_ERR(d);
+       if (!d)
+               return -ENOMEM;
        clk_debugfs_root = d;
 
        list_for_each_entry(c, &clocks, node) {