Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98181
b: refs/heads/master
c: 958a65f
h: refs/heads/master
i:
  98179: 6c3cc6f
v: v3
  • Loading branch information
Julia Lawall authored and Paul Mackerras committed Jun 16, 2008
1 parent c36076c commit 4f53ab1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: 8b9dba2ce28f64246198704b23f133bed5429e62
refs/heads/master: 958a65f205fdc5ce5461d79376073b89acc51b31
13 changes: 10 additions & 3 deletions trunk/drivers/macintosh/therm_adt746x.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,18 +562,24 @@ thermostat_init(void)
therm_type = ADT7460;
else if (of_device_is_compatible(np, "adt7467"))
therm_type = ADT7467;
else
else {
of_node_put(np);
return -ENODEV;
}

prop = of_get_property(np, "hwsensor-params-version", NULL);
printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop,
(*prop == 1)?"":"un");
if (*prop != 1)
if (*prop != 1) {
of_node_put(np);
return -ENODEV;
}

prop = of_get_property(np, "reg", NULL);
if (!prop)
if (!prop) {
of_node_put(np);
return -ENODEV;
}

/* look for bus either by path or using "reg" */
if (strstr(np->full_name, "/i2c-bus@") != NULL) {
Expand Down Expand Up @@ -610,6 +616,7 @@ thermostat_init(void)

if (of_dev == NULL) {
printk(KERN_ERR "Can't register temperatures device !\n");
of_node_put(np);
return -ENODEV;
}

Expand Down

0 comments on commit 4f53ab1

Please sign in to comment.