ASoC: s3c-i2s-v2 needs to declare a license for modular builds
[pandora-kernel.git] / drivers / macintosh / therm_adt746x.c
index 5366dc9..82607ad 100644 (file)
 #include <linux/kthread.h>
 #include <linux/moduleparam.h>
 #include <linux/freezer.h>
+#include <linux/of_platform.h>
 
 #include <asm/prom.h>
 #include <asm/machdep.h>
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/sections.h>
-#include <asm/of_platform.h>
 
 #undef DEBUG
 
@@ -554,7 +554,7 @@ thermostat_init(void)
        const u32 *prop;
        int i = 0, offset = 0;
        int err;
-       
+
        np = of_find_node_by_name(NULL, "fan");
        if (!np)
                return -ENODEV;
@@ -613,13 +613,13 @@ thermostat_init(void)
        }
 
        of_dev = of_platform_device_create(np, "temperatures", NULL);
-       
+       of_node_put(np);
+
        if (of_dev == NULL) {
                printk(KERN_ERR "Can't register temperatures device !\n");
-               of_node_put(np);
                return -ENODEV;
        }
-       
+
        err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
        err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
        err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);