1. 19 Mar, 2012 40 commits
    • Guenter Roeck's avatar
      hwmon: (lineage-pem) Convert to use devm_kzalloc · 07404aab
      Guenter Roeck authored
      Marginally less code and eliminate the possibility of memory leaks.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      07404aab
    • Guenter Roeck's avatar
      hwmon: (hwmon-vid) Fix checkpatch issues · f352df65
      Guenter Roeck authored
      Fixed:
      ERROR: code indent should use tabs where possible
      ERROR: space required before the open parenthesis '('
      WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
      
      Not fixed (url):
      WARNING: line over 80 characters
      
      Not fixed (false positive):
      ERROR: Macros with complex values should be enclosed in parenthesis
      
      Cc: Rudolf Marek <r.marek@assembler.cz>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      f352df65
    • Guenter Roeck's avatar
      hwmon: (hwmon-vid) Add new entries to VRM model table · 3230f704
      Guenter Roeck authored
      The VRM model table was missing several Intel CPUs, resulting in wrong VRM table
      entries to be used for many recent CPUs. Update it. Also, use values from
      struct cpuinfo_x86 to retrieve CPU model information instead of re-calculating
      it locally.
      
      Cc: Rudolf Marek <r.marek@assembler.cz>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      3230f704
    • Jean Delvare's avatar
      hwmon: (lm80) Add detection of NatSemi/TI LM96080 · 9908ad4c
      Jean Delvare authored
      Add detection of the National Semiconductor (now Texas Instruments)
      LM96080. It is functionally compatible with the LM80 but detection is
      completely different.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Guenter Roeck <guenter.roeck@ericsson.com>
      Cc: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      9908ad4c
    • Jean Delvare's avatar
      hwmon: (lm87) Get rid of macro-generated functions · 0e190b7f
      Jean Delvare authored
      Use SENSORS_DEVICE_ATTR instead of DEVICE_ATTR for most attributes,
      so that the attribute number can be retrieved and it is no longer
      necessary to generate functions using macros.
      
      This shaves about 2 kB on the binary module size.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      0e190b7f
    • Jean Delvare's avatar
      hwmon: (lm87) Reorganize the code · 8652a264
      Jean Delvare authored
      Reorder functions and driver declaration to no longer need to
      forward-declare functions. Also rename new_client to just client
      everywhere for readability.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      8652a264
    • Henrik Rydberg's avatar
      hwmon: (applesmc) Silence uninitialized warnings · 0fc86eca
      Henrik Rydberg authored
      Some error paths do not set a result, leading to the (false)
      assumption that the value may be used uninitialized. Set results for
      those paths as well.
      Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
      Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
      0fc86eca
    • Guenter Roeck's avatar
      hwmon: (lm70) Fix: do not use assignment in if condition · 7599d32b
      Guenter Roeck authored
      Fix checkpatch issue:
      ERROR: do not use assignment in if condition
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      7599d32b
    • Guenter Roeck's avatar
      hwmon: (lm70) Register hwmon device after creating attribute files, and remove it first · e200c14f
      Guenter Roeck authored
      Register hwmon device as last operation in the probe function to ensure that all
      attribute files exist when accessed from user applications. Otherwise, there
      is a short time frame where the device is registered as hwmon device but
      sysfs attributes do not yet exist. This could result in applications erroneously
      not detecting attributes.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      e200c14f
    • Guenter Roeck's avatar
      01d9def5
    • Guenter Roeck's avatar
      130067d7
    • Guenter Roeck's avatar
      hwmon: (w83781d) Fix: do not use assignment in if condition · 79501333
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      79501333
    • Guenter Roeck's avatar
      hwmon: (w83781d) Fix multi-line comments · aff6e00e
      Guenter Roeck authored
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      aff6e00e
    • Guenter Roeck's avatar
      hwmon: (smsc47b397) Fix multi-line comments · 2a52dd66
      Guenter Roeck authored
      Cc: Mark M Hoffman <mhoffman@lightlink.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      2a52dd66
    • Guenter Roeck's avatar
      hwmon: (pc87427) Fix multi-line comments · 36564efa
      Guenter Roeck authored
      Cc: Jean Delvare <khali@linux-fr.org>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      36564efa
    • Guenter Roeck's avatar
      hwmon: (max1668) Fix multi-line comments · b6707b78
      Guenter Roeck authored
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      b6707b78
    • Guenter Roeck's avatar
      1160631b
    • Guenter Roeck's avatar
      hwmon: (emc2103) Fix multi-line comments · bf0f3a04
      Guenter Roeck authored
      Cc: Steve Glendinning <steve.glendinning@smsc.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      bf0f3a04
    • Guenter Roeck's avatar
      hwmon: (adm1031) Fix multi-line comments · fbb6670d
      Guenter Roeck authored
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      fbb6670d
    • Guenter Roeck's avatar
      hwmon: (adm1029) Fix multi-line comments · 94b991d4
      Guenter Roeck authored
      Cc: Corentin Labbe <corentin.labbe@geomatys.fr>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      94b991d4
    • Guenter Roeck's avatar
      hwmon: (w83627hf) Fix checkpatch issues · 27b9de3c
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      27b9de3c
    • Guenter Roeck's avatar
      hwmon: (w83l786ng) Fix checkpatch issues · ca3ccad8
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      ca3ccad8
    • Guenter Roeck's avatar
      hwmon: (w83793) Fix checkpatch issues · 47efe877
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      47efe877
    • Guenter Roeck's avatar
      hwmon: (w83792d) Fix checkpatch issues · d1743681
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      d1743681
    • Guenter Roeck's avatar
      hwmon: (vt1211) Fix: do not use assignment in if condition · 2185696d
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      2185696d
    • Guenter Roeck's avatar
      hwmon: (vt1211) Fix checkpatch issues · b162c033
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      b162c033
    • Guenter Roeck's avatar
      hwmon: (via686a) Fix checkpatch issues · 9004ac81
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      9004ac81
    • Guenter Roeck's avatar
      hwmon: (pc87360) Fix: do not use assignment in if condition · bce2778d
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      bce2778d
    • Guenter Roeck's avatar
      hwmon: (pc87360) Fix checkpatch issues · 449a7a07
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      449a7a07
    • Guenter Roeck's avatar
      hwmon: (max1619): Fix checkpatch issues · 8958dfb7
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      8958dfb7
    • Guenter Roeck's avatar
      hwmon: (lm85) Fix checkpatch issues · 09770b26
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      09770b26
    • Guenter Roeck's avatar
      hwmon: (lm78) Fix checkpatch issues · 9b03079f
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarJean Delvare <khali@linux-fr.org>
      9b03079f
    • Guenter Roeck's avatar
      hwmon: (lm77) Fix checkpatch issues · 02fe2fd9
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      02fe2fd9
    • Guenter Roeck's avatar
      hwmon: (gl520sm) Fix: do not use assignment in if condition · f445a9af
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      f445a9af
    • Guenter Roeck's avatar
      hwmon: (gl520sm) Fix checkpatch issues · 43da3d12
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      43da3d12
    • Guenter Roeck's avatar
      hwmon: (gl518sm) Fix checkpatch issues · 228f8e0c
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      228f8e0c
    • Guenter Roeck's avatar
      hwmon: (dme1737) Fix checkpatch issues · c8de8362
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      c8de8362
    • Guenter Roeck's avatar
      hwmon: (asb100): Fix checkpatch issues · 8c103696
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      8c103696
    • Guenter Roeck's avatar
      hwmon: (adm9240) Fix checkpatch issues · c387e4eb
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      c387e4eb
    • Guenter Roeck's avatar
      hwmon: (adm1026) Fix checkpatch issues · 86aa3e22
      Guenter Roeck authored
      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: default avatarGuenter Roeck <linux@roeck-us.net>
      86aa3e22