1
0
Fork 0
Commit Graph

1794 Commits (731a7378b81c2f5fa88ca1ae20b83d548d5613dc)

Author SHA1 Message Date
Jean Delvare 72fea694c4 hwmon: (w83795) Unconditionally support manual fan speed control
Manual fan speed control uses a standard interface and has received
sufficient testing and review by now, it can be enabled
unconditionally. This includes attributes pwm[1-8], pwm[1-8]_enable,
pwm[1-8]_mode and pwm[1-8]_freq.

We only let the user switch from automatic mode to manual mode, but
not the other way around, as automatic control settings may not have
been set properly by the BIOS.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-23 10:02:17 +01:00
Andre Przywara 941a956b0e hwmon: (fam15h_power) Increase output resolution
On high CPU load the accumulating values in the running_avg_cap
register are very low (below 10), so averaging them too early leads
to unnecessary poor output resolution. Since we pretend to output
micro-Watt we better keep all the bits we have as long as possible.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-03-23 10:02:17 +01:00
Andreas Herrmann fc0900cbda hwmon: (fam15h_power) Correct sign extension of running_avg_capture
Wrong bit was used for sign extension which caused wrong end results.
Thanks to Andre for spotting this bug.

Reported-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@vger.kernel.org
2012-03-23 10:02:17 +01:00
Linus Torvalds 31f6765266 hwmon changes for v3.4
Mostly cleanup. No new drivers this time around, but support for several chips
 added to existing drivers: TPS40400, TPS40422, MTD040, MAX34446, ZL9101M,
 ZL9117M, and LM96080. Also, added watchdog support for SCH56xx, and additional
 attributes for a couple of drivers.
 
 312869e hwmon: (sch56xx) Add support for the integrated watchdog (v2)
 840e191 hwmon: (w83627ehf) Add support for temperature offset registers
 86dda17 hwmon: (jc42) Remove unnecessary device IDs
 3360a10 hwmon: (zl6100) Add support for ZL9101M and ZL9117M
 9271126 hwmon: (adm1275) Add support for ADM1075
 590defe hwmon: (max34440) Add support for MAX34446
 60b873e hwmon: (pmbus) Add more virtual registers
 2163340 hwmon: (pmbus) Add support for Lineage Power MDT040
 c5f35c9 hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
 56aad5d hwmon: (max34440) Add support for 'lowest' output voltage attribute
 f15df57 hwmon: (jc42) Convert to use devm_kzalloc
 918ddef hwmon: (max16065) Convert to use devm_kzalloc
 b8a5a7c hwmon: (smm665) Convert to use devm_kzalloc
 3683928 hwmon: (ltc4261) Convert to use devm_kzalloc
 dd285ad hwmon: (pmbus) Simplify remove functions
 8b313ca hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
 07404aa hwmon: (lineage-pem) Convert to use devm_kzalloc
 f352df6 hwmon: (hwmon-vid) Fix checkpatch issues
 3230f70 hwmon: (hwmon-vid) Add new entries to VRM model table
 9908ad4 hwmon: (lm80) Add detection of NatSemi/TI LM96080
 0e190b7 hwmon: (lm87) Get rid of macro-generated functions
 8652a26 hwmon: (lm87) Reorganize the code
 0fc86ec hwmon: (applesmc) Silence uninitialized warnings
 7599d32 hwmon: (lm70) Fix: do not use assignment in if condition
 e200c14 hwmon: (lm70) Register hwmon device after creating attribute files, and remove it first
 01d9def hwmon: (w83l786ng) Fix multi-line comments
 130067d hwmon: (w83l785ts) Fix multi-line comments
 7950133 hwmon: (w83781d) Fix: do not use assignment in if condition
 aff6e00 hwmon: (w83781d) Fix multi-line comments
 2a52dd6 hwmon: (smsc47b397) Fix multi-line comments
 36564ef hwmon: (pc87427) Fix multi-line comments
 b6707b7 hwmon: (max1668) Fix multi-line comments
 1160631 hwmon: (lm80) Fix multi-line comments
 bf0f3a0 hwmon: (emc2103) Fix multi-line comments
 fbb6670 hwmon: (adm1031) Fix multi-line comments
 94b991d hwmon: (adm1029) Fix multi-line comments
 27b9de3 hwmon: (w83627hf) Fix checkpatch issues
 ca3ccad hwmon: (w83l786ng) Fix checkpatch issues
 47efe87 hwmon: (w83793) Fix checkpatch issues
 d174368 hwmon: (w83792d) Fix checkpatch issues
 2185696 hwmon: (vt1211) Fix: do not use assignment in if condition
 b162c03 hwmon: (vt1211) Fix checkpatch issues
 9004ac8 hwmon: (via686a) Fix checkpatch issues
 bce2778 hwmon: (pc87360) Fix: do not use assignment in if condition
 449a7a0 hwmon: (pc87360) Fix checkpatch issues
 8958dfb hwmon: (max1619): Fix checkpatch issues
 09770b2 hwmon: (lm85) Fix checkpatch issues
 9b03079 hwmon: (lm78) Fix checkpatch issues
 02fe2fd hwmon: (lm77) Fix checkpatch issues
 f445a9a hwmon: (gl520sm) Fix: do not use assignment in if condition
 43da3d1 hwmon: (gl520sm) Fix checkpatch issues
 228f8e0 hwmon: (gl518sm) Fix checkpatch issues
 c8de836 hwmon: (dme1737) Fix checkpatch issues
 8c10369 hwmon: (asb100): Fix checkpatch issues
 c387e4e hwmon: (adm9240) Fix checkpatch issues
 86aa3e2 hwmon: (adm1026) Fix checkpatch issues
 21d2a8f hwmon: (adm1021) Fix checkpatch issues
 1bd385d hwmon: (abituguru) Fix checkpatch issues
 8969e84 hwmon: (w83627ehf) Fix multi-line comments
 51683ee hwmon: (max1111) Fix multi-line comments
 1b05d22 hwmon: (ltc4151) Fix multi-line comments
 1b9c491 hwmon: (g760a) Fix multi-line comments
 20eaf72 hwmon: (f71882fg) Fix multi-line comments
 4bebced hwmon: (emc1403) Fix multi-line comments
 ca3c7b6 hwmon: (amc6821) Fix multi-line comments
 10775d1 hwmon: (ads7871) Fix multi-line comments
 d13d623 hwmon: (ads7828) Fix multi-line comments
 562fca2 hwmon: (abituguru3) Fix multi-line comments
 ec1c319 hwmon: (w83791d) Fix checkpatch issues
 a80b10c hwmon: (ultra45_env) Fix checkpatch issues
 4d387df hwmon: (thmc50) Fix checkpatch issues
 85a0c0d hwmon: (smsc47m1) Fix checkpatch issues
 7e61268 hwmon: (smsc47m1) Fix: do not use assignment in if condition
 7cc3cb6 hwmon: (smsc47m192) Fix checkpatch issues
 8fda79e hwmon: (sis5595) Fix checkpatch issues
 5725608 hwmon: (pcf8591) Fix checkpatch issues
 2804a4c hwmon: (lm93) Fix checkpatch issues
 a318afd hwmon: (lm92) Fix checkpatch issues
 073f1e6c hwmon: (lm87) Fix: do not use assignment in if condition
 c6370db hwmon: (lm87) Fix checkpatch issues
 525ad37 hwmon: (fschmd) Fix checkpatch issues
 f24d548 hwmon: (atxp1) Fix checkpatch issues
 724cc33 hwmon: (adt7462) Fix checkpatch issues
 790fa38 hwmon: (ltc4215) Fix multi-line comments
 430b4fc hwmon: (ltc4245) Fix multi-line comments
 a68abd3 hwmon: (wm8350-hwmon) Constify fixed string array
 85ebfd3 hwmon: (applesmc) Fix multi-line comments
 75bdc93 hwmon: (asus_atk0110) Fix multi-line comments
 3c4c497 hwmon: (it87) Constify fixed string arrays
 8deeac8 hwmon: (ad7414) Fix multi-line comments
 5d577db hwmon: (jc42) Fix multi-line comments
 780affe hwmon: (coretemp) Fix checkpatch error
 3af2861 hwmon: (pc87360) Fix multi-line comments
 07de3df hwmon: (wm831x-hwmon) Fix multi-line comments
 3c22e23 hwmon: (smm665) Fix checkpatch error
 3c56b06 hwmon: (asc7621) Fix multi-line comments
 4a0d71c hwmon: (it87) Fix multi-line comments
 86d566e hwmon: (hwmon-vid) Fix multi-line comments
 5ed0488 hwmon: (hwmon) Fix multi-line comments
 19f2c05 hwmon: (ds1621) Fix checkpatch issues
 91efffe hwmon: convert drivers/hwmon/* to use module_spi_driver()
 f0967ee hwmon: convert drivers/hwmon/* to use module_i2c_driver()
 61ba031 hwmon: (vt8231) Fix multi-line comments
 9ed5bc2 hwmon: (adt7475) Fix multi-line comments
 2fff084 hwmon: (f71805f) Fix checkpatch issues
 703af96 hwmon: (max6650) Fix multi-line comments
 c531eb3 hwmon: (w83781d) Fix checkpatch issues
 2b22de5 hwmon: (adm1025) Fix checkpatch issues
 7973841 hwmon: (abituguru3) Fix checkpatch issues
 65fe5c7 hwmon: (vt8231) Fix checkpatch issues
 bafda5d hwmon: (max6650) Fix checkpatch issues
 0117c3f hwmon: (pmbus) Replace strict_strtol with kstrtol
 b3789a0 hwmon: (lm83) fix checkpatch issues
 93092a6 hwmon: (k8temp) fix checkpatch issues
 96585f1 hwmon: (lm80) reset device if error occurred
 6a9e7c4c hwmon: (lm80) fix checkpatch warnings
 6b904b6 hwmon: (adt7470) fix checkpatch issues
 e6a83db hwmon: (adt7411) fix checkpatch issues
 56c24af hwmon: (lm70) fix checkpatch issues
 1dc3708 hwmon: (f71882fg) fix checkpatch issues
 c6e8ac0 hwmon: (asus_atk0110) fix checkpatch issues
 99b8c83 hwmon: (adt7475) fix checkpatch issues
 b2ae8f8 hwmon: (smm665) fix checkpatch issues
 c9e1498 hwmon: (sht15) fix checkpatch issues
 0910b28 hwmon: (ibmaem) fix checkpatch issues
 dcb7cb9 hwmon: (ad7414) fix checkpatch issues
 e91aef2 hwmon: (ad7418) fix checkpatch issues
 5996542 hwmon: (w83l785ts) fix checkpatch issues
 a6100f6 hwmon: (wm831x-hwmon) fix checkpatch issues
 839a9ee hwmon: fix checkpatch issues
 08f5090 hwmon: (adm1029) fix checkpatch issues
 4d7c5d4 hwmon: (g760a) fix checkpatch issues
 7b102ed hwmon: (i5k_amb) fix checkpatch issues
 600151b hwmon: use DEFINE_PCI_DEVICE_TABLE
 7fe83ad hwmon: remove () used with return
 a6bee4a hwmon: (amc6821) fix initialisation
 2faaa93 hwmon: (lm80) add error handling
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPaJBFAAoJEMsfJm/On5mBhkMP/09vlmsG7J3TLHcSKYJBkvSx
 6VNOOJgPqnvF71Az0dX47SU3zVXhG3I7dZufd/hqOK+0CNylSB7OSZMcWvBTduea
 0hDLTYj++SyVDQfVXb3zCVLU/wAE3YuXB3umWPwAKit4s2wAYYRDVCjwK96B88rv
 llNvo6JryuJDBUq7xiEmr0vKWMO0mKwwjpMTGCD3NpzK02ZV49T0gM94xa4gi5nM
 QAhNeO1AzQTx0+mBSRlq+SBBLSiXQmHcNrhnxcRMPha1bEi1D+QESozsczr+9/lz
 8vuTIULOIZxafM4XkBsZdknvlZnYrA6ukituDfVfiYQVcljO/cNu+seutFQDCMJe
 1zTDoNGIAwwnw0sAWWmTQwUMi+GSvlaL20gmm8FhTlvQaj9hNETsPYxEvPEsBNY1
 ICCixZcwpa1mZBXmryz2btf8az0OlX/sApzyHiq24B7lSE5Fv4tBDtwypLRu5N8m
 C4oNXC2dqDU0gtVxzO5Lavu6LHWV9lhyZvRPO75+zxYt4i5cnO04GTAYWh46aOzO
 DAZcs8M2Rj++dI5VW9Vl0k8hP9eWjxtPJFhNv/OWTx4YYQRICrde+j7QZcikIUWF
 0bzYI/zeIcwOg059vhnglBFM3mr7Z92jm4mftcNaSj/zuUHbWf6AQLbIq86Zq7tF
 3Eru3WuTZTwAkyNAVWd5
 =cUoW
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon changes for v3.4 from Guenter Roeck:
 "Mostly cleanup.  No new drivers this time around, but support for
  several chips added to existing drivers: TPS40400, TPS40422, MTD040,
  MAX34446, ZL9101M, ZL9117M, and LM96080.  Also, added watchdog support
  for SCH56xx, and additional attributes for a couple of drivers."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (137 commits)
  hwmon: (sch56xx) Add support for the integrated watchdog (v2)
  hwmon: (w83627ehf) Add support for temperature offset registers
  hwmon: (jc42) Remove unnecessary device IDs
  hwmon: (zl6100) Add support for ZL9101M and ZL9117M
  hwmon: (adm1275) Add support for ADM1075
  hwmon: (max34440) Add support for MAX34446
  hwmon: (pmbus) Add more virtual registers
  hwmon: (pmbus) Add support for Lineage Power MDT040
  hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
  hwmon: (max34440) Add support for 'lowest' output voltage attribute
  hwmon: (jc42) Convert to use devm_kzalloc
  hwmon: (max16065) Convert to use devm_kzalloc
  hwmon: (smm665) Convert to use devm_kzalloc
  hwmon: (ltc4261) Convert to use devm_kzalloc
  hwmon: (pmbus) Simplify remove functions
  hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
  hwmon: (lineage-pem) Convert to use devm_kzalloc
  hwmon: (hwmon-vid) Fix checkpatch issues
  hwmon: (hwmon-vid) Add new entries to VRM model table
  hwmon: (lm80) Add detection of NatSemi/TI LM96080
  ...
2012-03-21 10:37:25 -07:00
Linus Torvalds 69a7aebcf0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "It's indeed trivial -- mostly documentation updates and a bunch of
  typo fixes from Masanari.

  There are also several linux/version.h include removals from Jesper."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
  kcore: fix spelling in read_kcore() comment
  constify struct pci_dev * in obvious cases
  Revert "char: Fix typo in viotape.c"
  init: fix wording error in mm_init comment
  usb: gadget: Kconfig: fix typo for 'different'
  Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
  writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
  writeback: fix typo in the writeback_control comment
  Documentation: Fix multiple typo in Documentation
  tpm_tis: fix tis_lock with respect to RCU
  Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
  Doc: Update numastat.txt
  qla4xxx: Add missing spaces to error messages
  compiler.h: Fix typo
  security: struct security_operations kerneldoc fix
  Documentation: broken URL in libata.tmpl
  Documentation: broken URL in filesystems.tmpl
  mtd: simplify return logic in do_map_probe()
  mm: fix comment typo of truncate_inode_pages_range
  power: bq27x00: Fix typos in comment
  ...
2012-03-20 21:12:50 -07:00
Linus Torvalds 4a52246302 driver core merge for 3.4-rc1
Here's the big driver core merge for 3.4-rc1.
 
 Lots of various things here, sysfs fixes/tweaks (with the nlink breakage
 reverted), dynamic debugging updates, w1 drivers, hyperv driver updates,
 and a variety of other bits and pieces, full information in the
 shortlog.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAk9neCsACgkQMUfUDdst+ylyQwCfY2eizvzw5HhjQs8gOiBRDADe
 yrgAnj1Zan2QkoCnQIFJNAoxqNX9yAhd
 =biH6
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core patches for 3.4-rc1 from Greg KH:
 "Here's the big driver core merge for 3.4-rc1.

  Lots of various things here, sysfs fixes/tweaks (with the nlink
  breakage reverted), dynamic debugging updates, w1 drivers, hyperv
  driver updates, and a variety of other bits and pieces, full
  information in the shortlog."

* tag 'driver-core-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (78 commits)
  Tools: hv: Support enumeration from all the pools
  Tools: hv: Fully support the new KVP verbs in the user level daemon
  Drivers: hv: Support the newly introduced KVP messages in the driver
  Drivers: hv: Add new message types to enhance KVP
  regulator: Support driver probe deferral
  Revert "sysfs: Kill nlink counting."
  uevent: send events in correct order according to seqnum (v3)
  driver core: minor comment formatting cleanups
  driver core: move the deferred probe pointer into the private area
  drivercore: Add driver probe deferral mechanism
  DS2781 Maxim Stand-Alone Fuel Gauge battery and w1 slave drivers
  w1_bq27000: Only one thread can access the bq27000 at a time.
  w1_bq27000 - remove w1_bq27000_write
  w1_bq27000: remove unnecessary NULL test.
  sysfs: Fix memory leak in sysfs_sd_setsecdata().
  intel_idle: Revert change of auto_demotion_disable_flags for Nehalem
  w1: Fix w1_bq27000
  driver-core: documentation: fix up Greg's email address
  powernow-k6: Really enable auto-loading
  powernow-k7: Fix CPU family number
  ...
2012-03-20 11:16:20 -07:00
Hans de Goede 312869ec93 hwmon: (sch56xx) Add support for the integrated watchdog (v2)
Add support for the watchdog integrated into the SMSC SCH5627 and
SCH5636 superio-s. Since the watchdog is part of the hwmon logical device
and thus shares ioports with it, the watchdog driver is integrated into the
existing hwmon drivers for these.

Note that this version of the watchdog support for sch56xx superio-s
implements the watchdog chardev interface itself, rather then relying on
the recently added watchdog core / watchdog_dev. This is done because
currently some needed functionality is missing from watchdog_dev, as soon
as this functionality is added (which is being discussed on the
linux-watchdog mailinglist), I'll convert this driver over to using
watchdog_dev.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[guenter.roeck@ericsson.com: Added missing linux/slab.h include]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-20 06:42:05 -07:00
Guenter Roeck 840e191dba hwmon: (w83627ehf) Add support for temperature offset registers
Add support for temperature offset registers for CPUTIN, SYSTIN,
and AUXTIN temperatures.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:54 -07:00
Guenter Roeck 86dda17634 hwmon: (jc42) Remove unnecessary device IDs
We don't really use or need separate device IDs for the various JC42.4 compliant
chips, so remove them and just stick with jc42.

Also update a datasheet references for SE98A, STTS424, and STTS424E02.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:53 -07:00
Guenter Roeck 3360a106f8 hwmon: (zl6100) Add support for ZL9101M and ZL9117M
ZL9101M and ZL9117M are compatible to ZL6100. Add support to the zl6100 driver.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:53 -07:00
Guenter Roeck 9271126966 hwmon: (adm1275) Add support for ADM1075
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:52 -07:00
Guenter Roeck 590defe59e hwmon: (max34440) Add support for MAX34446
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:52 -07:00
Guenter Roeck 60b873e332 hwmon: (pmbus) Add more virtual registers
Add PMBUS_VIRT_READ_TEMP_AVG, PMBUS_VIRT_READ_TEMP2_AVG,
PMBUS_VIRT_READ_POUT_AVG, PMBUS_VIRT_READ_POUT_MAX,
and PMBUS_VIRT_RESET_POUT_HISTORY.

We'll need those for MAX34446.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:51 -07:00
Guenter Roeck 216334094a hwmon: (pmbus) Add support for Lineage Power MDT040
MDT040 is supported by the generic PMBus driver. Add device ID and reference to
datasheet. Also mention Lineage Power device support in Kconfig.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:50 -07:00
Guenter Roeck c5f35c9d82 hwmon: (pmbus) Add support for TI TPS40400 and TPS40422
TPS40400 and TPS40422 are supported by the generic PMBus driver.
Add device IDs and data sheet references.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:50 -07:00
Guenter Roeck 56aad5d143 hwmon: (max34440) Add support for 'lowest' output voltage attribute
MAX34440 and compatibles support reporting the lowest measured output voltage.
Add support for it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:49 -07:00
Guenter Roeck f15df57ded hwmon: (jc42) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.
Also replace new_client variable with client and introduce dev variable to make
the code a bit easier to read.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:48 -07:00
Guenter Roeck 918ddef35f hwmon: (max16065) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:48 -07:00
Guenter Roeck b8a5a7cebd hwmon: (smm665) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:47 -07:00
Guenter Roeck 3683928720 hwmon: (ltc4261) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:46 -07:00
Guenter Roeck dd285ad737 hwmon: (pmbus) Simplify remove functions
Since devm_kzalloc() is now used to allocate driver memory, the client
driver remove function has no purpose other than to call pmbus_do_remove().
This means we can get rid of it by redefining pmbus_do_remove() to use the
same prototype, and pointing to it directly.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:46 -07:00
Guenter Roeck 8b313ca7f1 hwmon: (pmbus) Convert pmbus drivers to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:45 -07:00
Guenter Roeck 07404aab52 hwmon: (lineage-pem) Convert to use devm_kzalloc
Marginally less code and eliminate the possibility of memory leaks.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:44 -07:00
Guenter Roeck f352df652f hwmon: (hwmon-vid) Fix checkpatch issues
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: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:44 -07:00
Guenter Roeck 3230f7049e hwmon: (hwmon-vid) Add new entries to VRM model table
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: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:43 -07:00
Jean Delvare 9908ad4cd4 hwmon: (lm80) Add detection of NatSemi/TI LM96080
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: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:43 -07:00
Jean Delvare 0e190b7fa3 hwmon: (lm87) Get rid of macro-generated functions
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: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:42 -07:00
Jean Delvare 8652a2642c hwmon: (lm87) Reorganize the code
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: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:41 -07:00
Henrik Rydberg 0fc86eca1b hwmon: (applesmc) Silence uninitialized warnings
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: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
2012-03-18 18:27:41 -07:00
Guenter Roeck 7599d32b13 hwmon: (lm70) Fix: do not use assignment in if condition
Fix checkpatch issue:
ERROR: do not use assignment in if condition

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:40 -07:00
Guenter Roeck e200c14f60 hwmon: (lm70) Register hwmon device after creating attribute files, and remove it first
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: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:39 -07:00
Guenter Roeck 01d9def5ba hwmon: (w83l786ng) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:39 -07:00
Guenter Roeck 130067d7c6 hwmon: (w83l785ts) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:38 -07:00
Guenter Roeck 795013333b hwmon: (w83781d) 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:37 -07:00
Guenter Roeck aff6e00ee1 hwmon: (w83781d) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:37 -07:00
Guenter Roeck 2a52dd667d hwmon: (smsc47b397) Fix multi-line comments
Cc: Mark M Hoffman <mhoffman@lightlink.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:36 -07:00
Guenter Roeck 36564efadd hwmon: (pc87427) Fix multi-line comments
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:35 -07:00
Guenter Roeck b6707b78ff hwmon: (max1668) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:35 -07:00
Guenter Roeck 1160631b10 hwmon: (lm80) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
2012-03-18 18:27:34 -07:00
Guenter Roeck bf0f3a0430 hwmon: (emc2103) Fix multi-line comments
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2012-03-18 18:27:33 -07:00
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