From: Stephen Rothwell Date: Thu, 3 Jan 2008 04:15:28 +0000 (+1100) Subject: [POWERPC] therm_windtunnel: Eliminate some build warnings X-Git-Tag: v2.6.25-rc1~1131^2~118 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=98894dffaf11981ac9dc33c818ecafcb02a5439b;p=linux-2.6-omap-h63xx.git [POWERPC] therm_windtunnel: 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_windtunnel.c: In function 'setup_hardware': drivers/macintosh/therm_windtunnel.c:268: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result drivers/macintosh/therm_windtunnel.c:269: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result Signed-off-by: Stephen Rothwell Signed-off-by: Paul Mackerras --- diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 37224025f00..63ef1f6faae 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c @@ -223,6 +223,7 @@ static void setup_hardware( void ) { int val; + int err; /* save registers (if we unload the module) */ x.r0 = read_reg( x.fan, 0x00, 1 ); @@ -265,8 +266,11 @@ setup_hardware( void ) x.upind = -1; /* tune_fan( fan_up_table[x.upind].fan_setting ); */ - device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); - device_create_file( &x.of_dev->dev, &dev_attr_case_temperature ); + err = device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); + err |= device_create_file( &x.of_dev->dev, &dev_attr_case_temperature ); + if (err) + printk(KERN_WARNING + "Failed to create temperature attribute file(s).\n"); } static void