diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/therm_adt746x.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c index 276945d51513..54f4942a2968 100644 --- a/drivers/macintosh/therm_adt746x.c +++ b/drivers/macintosh/therm_adt746x.c | |||
@@ -553,6 +553,7 @@ thermostat_init(void) | |||
553 | struct device_node* np; | 553 | struct device_node* np; |
554 | const u32 *prop; | 554 | const u32 *prop; |
555 | int i = 0, offset = 0; | 555 | int i = 0, offset = 0; |
556 | int err; | ||
556 | 557 | ||
557 | np = of_find_node_by_name(NULL, "fan"); | 558 | np = of_find_node_by_name(NULL, "fan"); |
558 | if (!np) | 559 | if (!np) |
@@ -612,17 +613,20 @@ thermostat_init(void) | |||
612 | return -ENODEV; | 613 | return -ENODEV; |
613 | } | 614 | } |
614 | 615 | ||
615 | device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature); | 616 | err = device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature); |
616 | device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature); | 617 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature); |
617 | device_create_file(&of_dev->dev, &dev_attr_sensor1_limit); | 618 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_limit); |
618 | device_create_file(&of_dev->dev, &dev_attr_sensor2_limit); | 619 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_limit); |
619 | device_create_file(&of_dev->dev, &dev_attr_sensor1_location); | 620 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_location); |
620 | device_create_file(&of_dev->dev, &dev_attr_sensor2_location); | 621 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_location); |
621 | device_create_file(&of_dev->dev, &dev_attr_limit_adjust); | 622 | err |= device_create_file(&of_dev->dev, &dev_attr_limit_adjust); |
622 | device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed); | 623 | err |= device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed); |
623 | device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed); | 624 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed); |
624 | if(therm_type == ADT7460) | 625 | if(therm_type == ADT7460) |
625 | device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed); | 626 | err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed); |
627 | if (err) | ||
628 | printk(KERN_WARNING | ||
629 | "Failed to create tempertaure attribute file(s).\n"); | ||
626 | 630 | ||
627 | #ifndef CONFIG_I2C_POWERMAC | 631 | #ifndef CONFIG_I2C_POWERMAC |
628 | request_module("i2c-powermac"); | 632 | request_module("i2c-powermac"); |