aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-01-02 23:17:12 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-16 22:57:31 -0500
commit10804f0fb89561d63b2131be17cfaf8d1a30468c (patch)
tree57494a3db14d089947a449048c0632071805536c /drivers/macintosh
parent98894dffaf11981ac9dc33c818ecafcb02a5439b (diff)
[POWERPC] therm_adt746x: Eliminate some build warnings
We don't care if the device_create_file calls fail, the driver will work just as well without them, so just issue a runtime warning. drivers/macintosh/therm_adt746x.c: In function 'thermostat_init': drivers/macintosh/therm_adt746x.c:615: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:616: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:617: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:618: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:619: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:620: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:621: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:622: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:623: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_adt746x.c:625: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/therm_adt746x.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 276945d5151..54f4942a296 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");