Commit Graph

1753 Commits

Author SHA1 Message Date
Guenter Roeck fbb6670d94 hwmon: (adm1031) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:33 -07:00
Guenter Roeck 94b991d4c7 hwmon: (adm1029) Fix multi-line comments
Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:32 -07:00
Guenter Roeck 27b9de3c4a hwmon: (w83627hf) Fix checkpatch issues
Fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
ERROR: do not use assignment in if condition

Modify multi-line comments to follow Documentation/CodingStyle.

Other checkpatch issues not fixed to reduce number of conflicts with pending
rewrite as mfd driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:32 -07:00
Guenter Roeck ca3ccad827 hwmon: (w83l786ng) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
WARNING: braces {} are not necessary for single statement blocks
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
WARNING: space prohibited between function name and open parenthesis '('

Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:31 -07:00
Guenter Roeck 47efe8772f hwmon: (w83793) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Also replaced "<constant> == <variable>" with "<variable> == <constant>".
Translation was done with the following coccinelle script to limit risk.

@@
identifier i;
constant C;
@@

<...
- C == i
+ i == C
...>

Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis

Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:30 -07:00
Guenter Roeck d17436813a hwmon: (w83792d) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ',' (ctx:VxV)
ERROR: space required after that ',' (ctx:WxV)
ERROR: spaces required around that ':' (ctx:VxE)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '||' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
WARNING: space prohibited between function name and open parenthesis '('

Modify multi-line comments to follow Documentation/CodingStyle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:30 -07:00
Guenter Roeck 2185696d7d hwmon: (vt1211) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Cc: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:29 -07:00
Guenter Roeck b162c03348 hwmon: (vt1211) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: switch and case should be at the same indent
ERROR: trailing statements should be on next line
WARNING: braces {} are not necessary for single statement blocks
WARNING: simple_strtol is obsolete, use kstrtol instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis

Not all fixed (code complexity):
ERROR: do not use assignment in if condition

Cc: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:28 -07:00
Guenter Roeck 9004ac8134 hwmon: (via686a) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: open brace '{' following function declarations go on the next line
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
ERROR: that open brace { should be on the previous line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:28 -07:00
Guenter Roeck bce2778df9 hwmon: (pc87360) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Cc: Jean Delvare <khali@linux-fr.org>
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:27 -07:00
Guenter Roeck 449a7a0720 hwmon: (pc87360) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: "foo * bar" should be "foo *bar"
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxE)
ERROR: spaces required around that '==' (ctx:VxV)
WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Not or not all fixed (code complexity):
ERROR: Macros with complex values should be enclosed in parenthesis
ERROR: do not use assignment in if condition

Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:26 -07:00
Guenter Roeck 8958dfb74a hwmon: (max1619): Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: trailing whitespace
WARNING: line over 80 characters
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:26 -07:00
Guenter Roeck 09770b2619 hwmon: (lm85) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Also: s/#define^I/#define /

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:25 -07:00
Guenter Roeck 9b03079fca hwmon: (lm78) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: trailing statements should be on next line
ERROR: trailing whitespace
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:24 -07:00
Guenter Roeck 02fe2fd949 hwmon: (lm77) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: trailing whitespace
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:24 -07:00
Guenter Roeck f445a9af93 hwmon: (gl520sm) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:23 -07:00
Guenter Roeck 43da3d123a hwmon: (gl520sm) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
ERROR: trailing statements should be on next line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not always fixed (complexity):
ERROR: do not use assignment in if condition

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:23 -07:00
Guenter Roeck 228f8e0c60 hwmon: (gl518sm) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxE)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
ERROR: trailing statements should be on next line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:22 -07:00
Guenter Roeck c8de83624c hwmon: (dme1737) Fix checkpatch issues
Fixed:
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
WARNING: simple_strtol is obsolete, use kstrtol instead

Modify multi-line comments to follow Documentation/CodingStyle.

Also: s/#define^I/#define /

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Juerg Haefliger <juergh@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:21 -07:00
Guenter Roeck 8c103696fa hwmon: (asb100): Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space prohibited after that open parenthesis '('
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:21 -07:00
Guenter Roeck c387e4eb24 hwmon: (adm9240) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: that open brace { should be on the previous line
WARNING: please, no space before tabs
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:20 -07:00
Guenter Roeck 86aa3e2210 hwmon: (adm1026) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: space prohibited after that '~' (ctx:WxW)
ERROR: space required after that ';' (ctx:VxO)
ERROR: space required after that ';' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxV)
WARNING: braces {} are not necessary for any arm of this statement
WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed:
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:19 -07:00
Guenter Roeck 21d2a8f17b hwmon: (adm1021) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: space prohibited between function name and open parenthesis '('

Modify multi-line comments to follow Documentation/CodingStyle.

Cc: Michael Abbott <michael.abbott@diamond.ac.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:19 -07:00
Guenter Roeck 1bd385d679 hwmon: (abituguru) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: else should follow close brace '}'
ERROR: switch and case should be at the same indent
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed:
WARNING: msleep < 20ms can sleep for up to 20ms

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:18 -07:00
Guenter Roeck 8969e84d95 hwmon: (w83627ehf) Fix multi-line comments
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:17 -07:00
Guenter Roeck 51683ee83e hwmon: (max1111) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:17 -07:00
Guenter Roeck 1b05d22f2c hwmon: (ltc4151) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: Per Dalen <per.dalen@appeartv.com>
2012-03-18 18:27:16 -07:00
Guenter Roeck 1b9c491df8 hwmon: (g760a) Fix multi-line comments
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:16 -07:00
Guenter Roeck 20eaf7247e hwmon: (f71882fg) Fix multi-line comments
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:15 -07:00
Guenter Roeck 4bebced84f hwmon: (emc1403) Fix multi-line comments
Cc: Kalhan Trisal <kalhan.trisal@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:14 -07:00
Guenter Roeck ca3c7b6342 hwmon: (amc6821) Fix multi-line comments
Cc: T. Mertelj <tomaz.mertelj@guest.arnes.si>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:14 -07:00
Guenter Roeck 10775d1899 hwmon: (ads7871) Fix multi-line comments
Cc: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:13 -07:00
Guenter Roeck d13d6232de hwmon: (ads7828) Fix multi-line comments
Cc: Steve Hardy <shardy@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:12 -07:00
Guenter Roeck 562fca2f7a hwmon: (abituguru3) Fix multi-line comments
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:12 -07:00
Guenter Roeck ec1c319417 hwmon: (w83791d) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ',' (ctx:VxV)
WARNING: braces {} are not necessary for single statement blocks
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesis

Cc: Charles Spirakis <bezaur@gmail.com>
Cc: Marc Hulsman <m.hulsman@tudelft.nl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:11 -07:00
Guenter Roeck a80b10ccac hwmon: (ultra45_env) Fix checkpatch issues
Fixed:
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:10 -07:00
Guenter Roeck 4d387df74e hwmon: (thmc50) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:10 -07:00
Guenter Roeck 85a0c0d1a1 hwmon: (smsc47m1) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '>=' (ctx:VxV)
ERROR: trailing statements should be on next line
ERROR: trailing whitespace
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: static const char * array should probably be static const char * const

Modify multi-line comments to follow Documentation/CodingStyle.

Also: s/#define^I/#define /

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:09 -07:00
Guenter Roeck 7e612685a3 hwmon: (smsc47m1) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:08 -07:00
Guenter Roeck 7cc3cb6662 hwmon: (smsc47m192) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '>' (ctx:VxV)
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
WARNING: please, no space before tabs
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Hartmut Rick <linux@rick.claranet.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:08 -07:00
Guenter Roeck 8fda79ec86 hwmon: (sis5595) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: trailing statements should be on next line
ERROR: trailing whitespace
ERROR: Macros with multiple statements should be enclosed in a do - while loop
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:07 -07:00
Guenter Roeck 57256088e1 hwmon: (pcf8591) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: spaces required around that ':' (ctx:VxV)
ERROR: spaces required around that '?' (ctx:VxV)
WARNING: line over 80 characters
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:07 -07:00
Guenter Roeck 2804a4cfcd hwmon: (lm93) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: else should follow close brace '}'
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that ':' (ctx:VxW)
ERROR: trailing statements should be on next line
WARNING: braces {} are not necessary for any arm of this statement
WARNING: do not add new typedefs
WARNING: please, no space before tabs
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed (unknown impact):
WARNING: msleep < 20ms can sleep for up to 20ms

Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:06 -07:00
Guenter Roeck a318afd890 hwmon: (lm92) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '*=' (ctx:VxV)
ERROR: trailing whitespace
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead

Modify multi-line comments to follow Documentation/CodingStyle.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:05 -07:00
Guenter Roeck 073f1e6c89 hwmon: (lm87) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Replace repeated calls to device_create_file() with calls to sysfs_create_group.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:05 -07:00
Guenter Roeck c6370dbe45 hwmon: (lm87) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: space required after that close brace '}'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: trailing statements should be on next line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Not fixed everywhere (code complexity):
ERROR: do not use assignment in if condition

As a side effect of the changes made, attribute set functions now return an
error if an attempt is made to write non-numeric values. Previously, such
writes were interpreted as writing 0.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:04 -07:00
Guenter Roeck 525ad37319 hwmon: (fschmd) Fix checkpatch issues
Fixed:
ERROR: that open brace { should be on the previous line
ERROR: trailing statements should be on next line
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:03 -07:00
Guenter Roeck f24d548bf2 hwmon: (atxp1) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: else should follow close brace '}'
ERROR: "foo * bar" should be "foo *bar"
WARNING: braces {} are not necessary for single statement blocks
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: please, no spaces at the start of a line
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Modify multi-line comments to follow Documentation/CodingStyle.

Cc: Sebastian Witt <se.witt@gmx.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:03 -07:00
Guenter Roeck 724cc3316e hwmon: (adt7462) Fix checkpatch issues
Fixed:
ERROR: that open brace { should be on the previous line
WARNING: please, no space before tabs

Cc: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:02 -07:00
Guenter Roeck 790fa38c12 hwmon: (ltc4215) Fix multi-line comments
Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Ira W. Snyder <iws@ovro.caltech.edu>
2012-03-18 18:27:02 -07:00
Guenter Roeck 430b4fcd82 hwmon: (ltc4245) Fix multi-line comments
Cc: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Ira W. Snyder <iws@ovro.caltech.edu>
2012-03-18 18:27:01 -07:00
Guenter Roeck a68abd32b9 hwmon: (wm8350-hwmon) Constify fixed string array
Constify fixed string array and make checkpatch happy.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-18 18:27:00 -07:00
Guenter Roeck 85ebfd3ef9 hwmon: (applesmc) Fix multi-line comments
Cc: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
2012-03-18 18:27:00 -07:00
Guenter Roeck 75bdc936ea hwmon: (asus_atk0110) Fix multi-line comments
Cc: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
2012-03-18 18:26:59 -07:00
Guenter Roeck 3c4c497191 hwmon: (it87) Constify fixed string arrays
Make checkpatch happy by constifying fixed string arrays.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:26:58 -07:00
Guenter Roeck 8deeac82b3 hwmon: (ad7414) Fix multi-line comments
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Stefan Roese <sr@denx.de>
2012-03-18 18:26:58 -07:00
Guenter Roeck 5d577dba04 hwmon: (jc42) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:57 -07:00
Guenter Roeck 780affe0e9 hwmon: (coretemp) Fix checkpatch error
Fix:
ERROR: Macros with complex values should be enclosed in parenthesis

Cc: Fenghua Yu <fenghua.yu@intel.com>
Acked-By: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:56 -07:00
Guenter Roeck 3af2861e8b hwmon: (pc87360) Fix multi-line comments
Cc: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:56 -07:00
Guenter Roeck 07de3dfb15 hwmon: (wm831x-hwmon) Fix multi-line comments
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:55 -07:00
Guenter Roeck 3c22e23260 hwmon: (smm665) Fix checkpatch error
Fix:
ERROR: Macros with complex values should be enclosed in parenthesis

Also updated multi-line comments to follow Documentation/CodingStyle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:54 -07:00
Guenter Roeck 3c56b066fb hwmon: (asc7621) Fix multi-line comments
Cc: George Joseph <george.joseph@fairview5.com>
Acked-by: George Joseph <george.joseph@fairview5.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:54 -07:00
Guenter Roeck 4a0d71cfdc hwmon: (it87) Fix multi-line comments
Fix multi-line comments, and clean up some of the affected comments.

Cc: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:53 -07:00
Guenter Roeck 86d566e58e hwmon: (hwmon-vid) Fix multi-line comments
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:53 -07:00
Guenter Roeck 5ed04880a3 hwmon: (hwmon) Fix multi-line comments
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:52 -07:00
Guenter Roeck 19f2c05964 hwmon: (ds1621) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: trailing whitespace
WARNING: labels should not be indented
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead

Also modified multi-line comments to follow Documentation/CodingStyle.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:26:51 -07:00
Axel Lin 91efffe26a hwmon: convert drivers/hwmon/* to use module_spi_driver()
This patch converts the drivers in drivers/hwmon/* to use the
module_spi_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Sonic Zhang <sonic.zhang@analog.com>
Cc: Marc Pignat <marc.pignat@hevs.ch>
Cc: Paul Thomas <pthomas8589@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:51 -07:00
Axel Lin f0967eea80 hwmon: convert drivers/hwmon/* to use module_i2c_driver()
This patch converts the drivers in drivers/hwmon/* to use the
module_i2c_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
Cc: Dirk Eibach <eibach@gdsys.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com>
Cc: David George <david.george@ska.ac.za>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>
Cc: Marc Hulsman <m.hulsman@tudelft.nl>
Cc: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:50 -07:00
Guenter Roeck 61ba031841 hwmon: (vt8231) Fix multi-line comments
Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:49 -07:00
Guenter Roeck 9ed5bc24fa hwmon: (adt7475) Fix multi-line comments
Cc: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:49 -07:00
Guenter Roeck 2fff0840c2 hwmon: (f71805f) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: "foo* bar" should be "foo *bar"
ERROR: need consistent spacing around '|' (ctx:VxW)
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
WARNING: static const char * array should probably be static const char * const

Also modified multi-line comments to follow Documents/Codingstyle.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:26:48 -07:00
Guenter Roeck 703af96040 hwmon: (max6650) Fix multi-line comments
Cc: Hans J. Koch <hjk@hansjkoch.de>
Acked-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:47 -07:00
Guenter Roeck c531eb3f22 hwmon: (w83781d) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: "foo* bar" should be "foo *bar"
ERROR: space prohibited after that open parenthesis '('
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
WARNING: line over 80 characters
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead
WARNING: space prohibited between function name and open parenthesis '('

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop
ERROR: Macros with complex values should be enclosed in parenthesis

Not all fixed (code complexity):
ERROR: do not use assignment in if condition

Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:47 -07:00
Guenter Roeck 2b22de5117 hwmon: (adm1025) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: trailing whitespace
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Not fixed:
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:46 -07:00
Guenter Roeck 79738416f6 hwmon: (abituguru3) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: "foo* bar" should be "foo *bar"
WARNING: line over 80 characters

Not fixed:
WARNING: msleep < 20ms can sleep for up to 20ms

Cc: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:45 -07:00
Guenter Roeck 65fe5c7957 hwmon: (vt8231) Fix checkpatch issues
Fixed:
ERROR: code indent should use tabs where possible
ERROR: do not use assignment in if condition
ERROR: trailing statements should be on next line
WARNING: braces {} are not necessary for any arm of this statement
WARNING: line over 80 characters
WARNING: please, no space before tabs
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Not fixed (false positive):
ERROR: Macros with multiple statements should be enclosed in a do - while loop

Cc: Roger Lucas <vt8231@hiddenengine.co.uk>
Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:45 -07:00
Guenter Roeck bafda5d0f5 hwmon: (max6650) Fix checkpatch issues
Fixed:
ERROR: do not use assignment in if condition
ERROR: open brace '{' following struct go on the same line
ERROR: spaces required around that '||' (ctx:VxV)
ERROR: switch and case should be at the same indent
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Cc: Hans J. Koch <hjk@hansjkoch.de>
Acked-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:44 -07:00
Guenter Roeck 0117c3f245 hwmon: (pmbus) Replace strict_strtol with kstrtol
strict_strtol is deprecated and results in a checkpatch warning.
Replace it with kstrtol.

Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:26:43 -07:00
Frans Meulenbroeks b3789a0de2 hwmon: (lm83) fix checkpatch issues
resolved:
ERROR: trailing whitespace
WARNING: please, no spaces at the start of a line
WARNING: simple_strtol is obsolete, use kstrtol instead
ERROR: do not use assignment in if condition

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:43 -07:00
Frans Meulenbroeks 93092a644f hwmon: (k8temp) fix checkpatch issues
resolved:
WARNING: line over 80 characters
ERROR: do not use assignment in if condition

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:42 -07:00
Frans Meulenbroeks 96585f1ae4 hwmon: (lm80) reset device if error occurred
If an error occurs while updating (e.g. because the chip was
disconnected) the device needs to be reinitialized in order
to get back to 11 bit temperature and set the fan divider.

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:42 -07:00
Frans Meulenbroeks 6a9e7c4c03 hwmon: (lm80) fix checkpatch warnings
fix:
WARNING: simple_strtol is obsolete, use kstrtol instead
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
[guenter.roeck@ericsson.com: kstrtol->kstrtoul where appropriate]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:41 -07:00
Frans Meulenbroeks 6b904b623a hwmon: (adt7470) fix checkpatch issues
fixed:
ERROR: that open brace { should be on the previous line
#1135: FILE: adt7470.c:1135:
+static struct attribute *adt7470_attr[] =
+{

ERROR: do not use assignment in if condition
#1279: FILE: adt7470.c:1279:
+	if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:40 -07:00
Frans Meulenbroeks e6a83dbec9 hwmon: (adt7411) fix checkpatch issues
fixed:
WARNING: please, no space before tabs
#11: FILE: adt7411.c:11:
+ * ^I  use power-down mode for suspend?, interrupt handling?$

not fixed as all other macros around it are the same structure and this one is only 2 chars longer:
WARNING: line over 80 characters
#229: FILE: adt7411.c:229:
+static ADT7411_BIT_ATTR(fast_sampling, ADT7411_REG_CFG3, ADT7411_CFG3_ADC_CLK_225);

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:40 -07:00
Frans Meulenbroeks 56c24af8de hwmon: (lm70) fix checkpatch issues
fixed:
ERROR: spaces required around that '=' (ctx:VxV)
#60: FILE: lm70.c:60:
+	s16 raw=0;
 	       ^

ERROR: do not use assignment in if condition
#168: FILE: lm70.c:168:
+	if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input))

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:39 -07:00
Frans Meulenbroeks 1dc370899f hwmon: (f71882fg) fix checkpatch issues
fixed:
WARNING: static const char * array should probably be static const char * const
+static const char *f71882fg_names[] = {

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:38 -07:00
Frans Meulenbroeks c6e8ac0405 hwmon: (asus_atk0110) fix checkpatch issues
fixed:
WARNING: line over 80 characters
#1321: FILE: asus_atk0110.c:1321:
+	if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if)

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:38 -07:00
Frans Meulenbroeks 99b8c83a77 hwmon: (adt7475) fix checkpatch issues
fixed:
WARNING: static const char * array should probably be static const char * const
+	static const char *names[] = {

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:37 -07:00
Frans Meulenbroeks b2ae8f87f4 hwmon: (smm665) fix checkpatch issues
fixed:
WARNING: please, no spaces at the start of a line
#379: FILE: smm665.c:379:
+  static ssize_t smm665_show_##what(struct device *dev, \$

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:36 -07:00
Frans Meulenbroeks c9e1498a18 hwmon: (sht15) fix checkpatch issues
fixed:
WARNING: line over 80 characters
#809: FILE: sht15.c:809:
+		/* If still not occurred or another handler has been scheduled */

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:36 -07:00
Frans Meulenbroeks 0910b28ef4 hwmon: (ibmaem) fix checkpatch issues
fixed:
WARNING: please, no space before tabs
+{"power3_average", ^I  aem2_show_pcap_value,^IPOWER_AUX},$

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:35 -07:00
Frans Meulenbroeks dcb7cb97ba hwmon: (ad7414) fix checkpatch issues
fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead
#133: FILE: ad7414.c:133:
+	long temp = simple_strtol(buf, NULL, 10);

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:35 -07:00
Frans Meulenbroeks e91aef22cd hwmon: (ad7418) fix checkpatch issues
fixed:
WARNING: simple_strtol is obsolete, use kstrtol instead
+	long temp = simple_strtol(buf, NULL, 10);

ERROR: do not use assignment in if condition
+	if (!(data = kzalloc(sizeof(struct ad7418_data), GFP_KERNEL))) {

ERROR: do not use assignment in if condition
+	if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs)))

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:34 -07:00
Frans Meulenbroeks 599654255d hwmon: (w83l785ts) fix checkpatch issues
fixed:
ERROR: trailing whitespace
+ $

WARNING: please, no spaces at the start of a line
+ $

not fixed (did not want to break url):
WARNING: line over 80 characters
+ *   http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L785TS-S.pdf

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:33 -07:00
Frans Meulenbroeks a6100f6b49 hwmon: (wm831x-hwmon) fix checkpatch issues
fixed:
WARNING: static const char * array should probably be static const char * const
+static const char *input_names[] = {

not fixed (will probably provide separate fix later)
ERROR: Macros with multiple statements should be enclosed in a do - while loop
+#define WM831X_NAMED_VOLTAGE(id, name) \
+	WM831X_VOLTAGE(id, name); \
+	static SENSOR_DEVICE_ATTR(in##id##_label, S_IRUGO, show_label,	\
+				  NULL, name)

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:33 -07:00
Frans Meulenbroeks 839a9eefc9 hwmon: fix checkpatch issues
fixed:
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
+EXPORT_SYMBOL_GPL(hwmon_device_register);

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
+EXPORT_SYMBOL_GPL(hwmon_device_unregister);

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:32 -07:00
Frans Meulenbroeks 08f5090774 hwmon: (adm1029) fix checkpatch issues
fixed:
ERROR: space prohibited after that open parenthesis '('
+#define DIV_FROM_REG(val)	( 1 << (((val) >> 6) - 1))

WARNING: simple_strtol is obsolete, use kstrtol instead
+	long val = simple_strtol(buf, NULL, 10);

ERROR: do not use assignment in if condition
+	if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group)))

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:31 -07:00
Frans Meulenbroeks 4d7c5d4f40 hwmon: (g760a) fix checkpatch issues
fixed:
ERROR: code indent should use tabs where possible
+            fan speed PWM controller chip$

ERROR: trailing whitespace
+      http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf $

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:31 -07:00
Frans Meulenbroeks 7b102ed660 hwmon: (i5k_amb) fix checkpatch issues
fixed:
WARNING: simple_strtoul is obsolete, use kstrtoul instead
+	unsigned long temp = simple_strtoul(buf, NULL, 10) / 500;

WARNING: simple_strtoul is obsolete, use kstrtoul instead
+	unsigned long temp = simple_strtoul(buf, NULL, 10) / 500;

WARNING: simple_strtoul is obsolete, use kstrtoul instead
+	unsigned long temp = simple_strtoul(buf, NULL, 10) / 500;

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:30 -07:00
Frans Meulenbroeks 600151b9de hwmon: use DEFINE_PCI_DEVICE_TABLE
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:26:29 -07:00