aboutsummaryrefslogtreecommitdiff
path: root/drivers/macintosh/therm_adt746x.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-01-08 11:05:59 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-08 11:05:59 -0800
commit7f46b1343f723f98634a5dcee47856b2000079ed (patch)
treeed22b6298c8dd2f687890a0d79abcd1d273b5f81 /drivers/macintosh/therm_adt746x.c
parentb8c31da64165b8566fc6e1c9c826f76e7b98ff02 (diff)
parent9e42d0cf5020aaf217433cad1a224745241d212a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/macintosh/therm_adt746x.c')
-rw-r--r--drivers/macintosh/therm_adt746x.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 22bf981d393..82607add69a 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -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);