Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10804f0fb89561d63b2131be17cfaf8d1a30468c
Commit:     10804f0fb89561d63b2131be17cfaf8d1a30468c
Parent:     98894dffaf11981ac9dc33c818ecafcb02a5439b
Author:     Stephen Rothwell <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 3 15:17:12 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Jan 17 14:57:31 2008 +1100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 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 276945d..54f4942 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -553,6 +553,7 @@ thermostat_init(void)
        struct device_node* np;
        const u32 *prop;
        int i = 0, offset = 0;
+       int err;
        
        np = of_find_node_by_name(NULL, "fan");
        if (!np)
@@ -612,17 +613,20 @@ thermostat_init(void)
                return -ENODEV;
        }
        
-       device_create_file(&of_dev->dev, &dev_attr_sensor1_temperature);
-       device_create_file(&of_dev->dev, &dev_attr_sensor2_temperature);
-       device_create_file(&of_dev->dev, &dev_attr_sensor1_limit);
-       device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
-       device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
-       device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
-       device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
-       device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
-       device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
+       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);
+       err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_limit);
+       err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_location);
+       err |= device_create_file(&of_dev->dev, &dev_attr_sensor2_location);
+       err |= device_create_file(&of_dev->dev, &dev_attr_limit_adjust);
+       err |= device_create_file(&of_dev->dev, &dev_attr_specified_fan_speed);
+       err |= device_create_file(&of_dev->dev, &dev_attr_sensor1_fan_speed);
        if(therm_type == ADT7460)
-               device_create_file(&of_dev->dev, &dev_attr_sensor2_fan_speed);
+               err |= device_create_file(&of_dev->dev, 
&dev_attr_sensor2_fan_speed);
+       if (err)
+               printk(KERN_WARNING
+                       "Failed to create tempertaure attribute file(s).\n");
 
 #ifndef CONFIG_I2C_POWERMAC
        request_module("i2c-powermac");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to