aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-01-02 23:15:28 -0500
committerPaul Mackerras <paulus@samba.org>2008-01-16 22:57:27 -0500
commit98894dffaf11981ac9dc33c818ecafcb02a5439b (patch)
treea3da023e1825afda8f4a5a7c5a3d03096df9190d /drivers/macintosh
parent85e99b9fffb62e101e38c74c935256fc589703c2 (diff)
[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 <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/therm_windtunnel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index 37224025f00e..63ef1f6faaed 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -223,6 +223,7 @@ static void
223setup_hardware( void ) 223setup_hardware( void )
224{ 224{
225 int val; 225 int val;
226 int err;
226 227
227 /* save registers (if we unload the module) */ 228 /* save registers (if we unload the module) */
228 x.r0 = read_reg( x.fan, 0x00, 1 ); 229 x.r0 = read_reg( x.fan, 0x00, 1 );
@@ -265,8 +266,11 @@ setup_hardware( void )
265 x.upind = -1; 266 x.upind = -1;
266 /* tune_fan( fan_up_table[x.upind].fan_setting ); */ 267 /* tune_fan( fan_up_table[x.upind].fan_setting ); */
267 268
268 device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature ); 269 err = device_create_file( &x.of_dev->dev, &dev_attr_cpu_temperature );
269 device_create_file( &x.of_dev->dev, &dev_attr_case_temperature ); 270 err |= device_create_file( &x.of_dev->dev, &dev_attr_case_temperature );
271 if (err)
272 printk(KERN_WARNING
273 "Failed to create temperature attribute file(s).\n");
270} 274}
271 275
272static void 276static void