03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RW for read/write attributes. This simplifies the source
code, improves readbility, and reduces the chance of inconsistencies.The conversion was done automatically using coccinelle. It was validated
by compiling both the old and the new source code and comparing its text,
data, and bss size.Signed-off-by: Julia Lawall
[groeck: Updated description]
Signed-off-by: Guenter Roeck
06 Aug, 2014
1 commit
-
vrm is an u8, so the written value needs to be limited to [0, 255].
Signed-off-by: Axel Lin
Signed-off-by: Guenter Roeck
20 Oct, 2013
1 commit
-
We cap the upper bound of "mtimeout" but since it's signed we should
check for negative values as well. The mistake is harmless. But I have
changed it to unsigned as a cleanup.Signed-off-by: Dan Carpenter
Signed-off-by: Guenter Roeck
19 Oct, 2013
1 commit
-
Signed-off-by: LABBE Corentin
Signed-off-by: Guenter Roeck
08 Apr, 2013
1 commit
-
Cc: Corentin Labbe
Cc: Mark M. Hoffman
Cc: Fenghua Yu
Cc: Juerg Haefliger
Cc: Andreas Herrmann
Cc: Rudolf Marek
Cc: Jim Cromie
Cc: Roger Lucas
Cc: Marc Hulsman
Signed-off-by: Guenter Roeck
26 Jan, 2013
1 commit
-
SENSORS_LIMIT and the generic clamp_val have the same functionality,
and clamp_val is more efficient.This patch reduces text size by 9052 bytes and bss size by 11624 bytes
for x86_64 builds.Signed-off-by: Guenter Roeck
Acked-by: George Joseph
Acked-by: Jean Delvare
10 Oct, 2012
1 commit
-
Many hwmon drivers use jiffies but omit the inclusion of the header
file. Fix that, and also fix one driver which was including the header
file but didn't need it.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
Acked-by: Luca Tettamanti
Cc: Marc Hulsman
Cc: Rudolf Marek
24 Sep, 2012
1 commit
-
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
28 Mar, 2012
1 commit
-
nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.Signed-off-by: Wim Van Sebroeck
19 Mar, 2012
3 commits
-
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 insteadModify multi-line comments to follow Documentation/CodingStyle.
Also replaced " == " with " == ".
Translation was done with the following coccinelle script to limit risk.@@
identifier i;
constant C;
@@Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesisCc: Rudolf Marek
Signed-off-by: Guenter Roeck -
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
Cc: Corentin Labbe
Cc: Dirk Eibach
Cc: "Mark M. Hoffman"
Cc: Steve Glendinning
Cc: Riku Voipio
Cc: Guillaume Ligneul
Cc: David George
Cc: "Hans J. Koch"
Cc: Marc Hulsman
Cc: Rudolf Marek
Signed-off-by: Guenter Roeck -
fix checkpatch ERROR:
return is not a function, parentheses are not requiredSigned-off-by: Frans Meulenbroeks
Signed-off-by: Guenter Roeck
13 Jan, 2012
1 commit
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Acked-by: Mauro Carvalho Chehab
Signed-off-by: Rusty Russell
06 Jan, 2012
1 commit
-
replaced strict_strtol with kstrtol and
replaced strict_strtuol with kstrtuolThis satisfies checkpatch -f
Compile tested only: no warnings or errors givenSigned-off-by: Frans Meulenbroeks
Signed-off-by: Guenter Roeck
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
13 Jan, 2011
2 commits
-
This is the same case as fschmd, from which the code was copied as far
as I can see. So the same clean-up applies:The WDIOC_GETSUPPORT ioctl only needs a mutex because it operates on a
static variable. There is no good reason to keep this variable static,
so let's just make it non-static and drop the now useless mutex
altogether.See the discussion at:
http://marc.info/?l=lm-sensors&m=125563869402323&w=2Signed-off-by: Jean Delvare
Cc: Hans de Goede
Acked-by: Guenter Roeck
Acked-by: Arnd Bergmann
Acked-by: Thomas Gleixner -
We have a standard intrusion detection interface now, drivers should
implement it. I've left the old interface in place for the time being,
with a deprecation warning, it will be removed later.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
05 Oct, 2010
1 commit
-
All these files use the big kernel lock in a trivial
way to serialize their private file operations,
typically resulting from an earlier semi-automatic
pushdown from VFS.None of these drivers appears to want to lock against
other code, and they all use the BKL as the top-level
lock in their file operations, meaning that there
is no lock-order inversion problem.Consequently, we can remove the BKL completely,
replacing it with a per-file mutex in every case.
Using a scripted approach means we can avoid
typos.These drivers do not seem to be under active
maintainance from my brief investigation. Apologies
to those maintainers that I have missed.file=$1
name=$2
if grep -q lock_kernel ${file} ; then
if grep -q 'include.*linux.mutex.h' ${file} ; then
sed -i '/include.*/d' ${file}
else
sed -i 's/include.*.*$/include /g' ${file}
fi
sed -i ${file} \
-e "/^#include.*linux.mutex.h/,$ {
1,/^\(static\|int\|long\)/ {
/^\(static\|int\|long\)/istatic DEFINE_MUTEX(${name}_mutex);} }" \
-e "s/\(un\)*lock_kernel\>[ ]*()/mutex_\1lock(\&${name}_mutex)/g" \
-e '/[ ]*cycle_kernel_lock();/d'
else
sed -i -e '/include.*\/d' ${file} \
-e '/cycle_kernel_lock()/d'
fiSigned-off-by: Arnd Bergmann
17 May, 2010
1 commit
-
These are the last remaining device drivers using
the ->ioctl file operation in the drivers directory
(except from v4l drivers).[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]Signed-off-by: Arnd Bergmann
Signed-off-by: Frederic Weisbecker
30 Mar, 2010
1 commit
-
"ret" is used to store the return value for watchdog_trigger() and it
should be signed for the error handling to work.Signed-off-by: Dan Carpenter
Acked-by: Hans de Goede
Signed-off-by: Jean Delvare
06 Mar, 2010
1 commit
-
Add watchdog functionality to the Winbond W83793 driver.
Signed-off-by: Sven Anders
Acked-by: Hans de Goede
Signed-off-by: Jean Delvare
15 Dec, 2009
3 commits
-
This macro simply declares an enum, so drivers might as well declare
it themselves.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang -
Struct i2c_client_address_data only contains one field at this point,
which makes its usefulness questionable. Get rid of it and pass simple
address lists around instead.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang -
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.Signed-off-by: Jean Delvare
Tested-by: Wolfram Sang
10 Dec, 2009
1 commit
-
As kind is now hard-coded to -1, there is room for code clean-ups.
Signed-off-by: Jean Delvare
Acked-by: Corentin Labbe
Cc: "Mark M. Hoffman"
Cc: Juerg Haefliger
Cc: Riku Voipio
Acked-by: "Hans J. Koch"
Cc: Rudolf Marek
07 Jan, 2009
1 commit
-
I2C_CLIENT_MODULE_PARM is overkill for force_subclients. We really
only use 4 out of the 48 slots, so we're better defining a custom
variable instead. This change saves 92 bytes of data for each of the
five drivers affected.Signed-off-by: Jean Delvare
Cc: Wolfgang Grandegger
Acked-by: Marc Hulsman
Cc: Mark M. Hoffman
17 Jul, 2008
1 commit
-
The new-style w83793 driver implements the optional detect()
callback to cover the use cases of the legacy driver.Signed-off-by: Jean Delvare
27 Apr, 2008
1 commit
-
* Rework the device initialization function so as to read the
"Multi-Function Pin Control" register (0x58) once instead of twice.
I2C transactions aren't cheap so this speeds up the driver loading.* Only create the "vrm" attribute if at least one VID value is
available.Signed-off-by: Jean Delvare
Cc: Gong Jun
Acked-by: Rudolf Marek
Signed-off-by: Mark M. Hoffman
19 Feb, 2008
1 commit
-
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
2 commits
-
What was true of reading the VRM value is also true of writing it: not
being a register value, it doesn't need hardware access, so we don't
need a reference to the i2c client. This allows for a minor code
cleanup. As gcc appears to be smart enough to simplify the generated
code by itself, this cleanup only affects the source code, the
generated binaries are unchanged.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
Remove duplicated defines.
Signed-off-by: Nicolas Kaiser
Acked-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
1 commit
-
Convert from class_device to device for hwmon_device_register/unregister
Signed-off-by: Tony Jones
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Kay Sievers
Signed-off-by: Mark M. Hoffman
19 Jan, 2007
4 commits
-
Ignore the VID readings when the motherboard has not designed
the function.Signed-off-by: Gong Jun
Signed-off-by: Rudolf Marek
Signed-off-by: Jean Delvare -
Catch the cases when alternative pins are used to route the
fan9-12 input.Signed-off-by: Rudolf Marek
Signed-off-by: Gong Jun
Signed-off-by: Jean Delvare -
Ignore the temperature readings when its channel is disabled,
ignore AMDSI readings.Signed-off-by: Gong Jun
Signed-off-by: Rudolf Marek
Signed-off-by: Jean Delvare -
Fix the driver to match the information in datasheet 1.0. AMD
SI interface is marked as reserved, computing formula for 5VDD
and 5VSB is updated.Signed-off-by: Gong Jun
Signed-off-by: Rudolf Marek
Signed-off-by: Jean Delvare
13 Dec, 2006
1 commit
-
Add support for the W83793 hardware monitoring chip. This driver
was originally contributed by Yuan Mu of Winbond Electronics Corp.Signed-off-by: Rudolf Marek
Signed-off-by: Jean Delvare