lkml.org 
[lkml]   [2003]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] sensors/w83781d.c creates useless sysfs entries
Hello,

here is a trivial fix for Winbond sensor driver, which currently creates
useless entries in sys/bus/i2c due to missing braces after if statements
- author probably forgot about the macro expansion.

Regards,
--
Jindrich Makovicka
--- w83781d.c.orig 2003-10-02 08:17:20.000000000 +0200
+++ w83781d.c 2003-10-11 14:45:59.000000000 +0200
@@ -1347,8 +1347,10 @@
}

device_create_file_in(new_client, 0);
- if (kind != w83783s && kind != w83697hf)
+ if (kind != w83783s && kind != w83697hf) {
device_create_file_in(new_client, 1);
+ }
+
device_create_file_in(new_client, 2);
device_create_file_in(new_client, 3);
device_create_file_in(new_client, 4);
@@ -1361,25 +1363,30 @@

device_create_file_fan(new_client, 1);
device_create_file_fan(new_client, 2);
- if (kind != w83697hf)
+ if (kind != w83697hf) {
device_create_file_fan(new_client, 3);
+ }

device_create_file_temp(new_client, 1);
device_create_file_temp(new_client, 2);
- if (kind != w83783s && kind != w83697hf)
+ if (kind != w83783s && kind != w83697hf) {
device_create_file_temp(new_client, 3);
-
- if (kind != w83697hf)
+ }
+
+ if (kind != w83697hf) {
device_create_file_vid(new_client);
-
- if (kind != w83697hf)
+ }
+
+ if (kind != w83697hf) {
device_create_file_vrm(new_client);
-
+ }
+
device_create_file_fan_div(new_client, 1);
device_create_file_fan_div(new_client, 2);
- if (kind != w83697hf)
+ if (kind != w83697hf) {
device_create_file_fan_div(new_client, 3);
-
+ }
+
device_create_file_alarms(new_client);

device_create_file_beep(new_client);
\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.017 / U:1.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site