24 Sep, 2020
1 commit
-
This driver doesn't use the id information provided by the old i2c
probe function, so it can trivially be converted to the simple
("probe_new") form.Signed-off-by: Stephen Kitt
Link: https://lore.kernel.org/r/20200813162026.1512242-1-steve@sk2.org
Signed-off-by: Guenter Roeck
04 Sep, 2019
1 commit
-
And simplify the error handling.
Signed-off-by: Wolfram Sang
Link: https://lore.kernel.org/r/20190903181256.13450-2-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck
24 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
675 mass ave cambridge ma 02139 usaextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 441 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Michael Ellerman (powerpc)
Reviewed-by: Richard Fontana
Reviewed-by: Allison Randal
Reviewed-by: Kate Stewart
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de
Signed-off-by: Greg Kroah-Hartman
16 Nov, 2017
1 commit
-
Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.Cc: Marc Hulsman
Cc: Jean Delvare
Cc: Guenter Roeck
Cc: linux-hwmon@vger.kernel.org
Signed-off-by: Andy Shevchenko
Reviewed-by: Jean Delvare
Signed-off-by: Guenter Roeck
03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RO for read only attributes and 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
04 Aug, 2014
1 commit
-
smatch complains as follows when checking w83791d.c.
drivers/hwmon/w83791d.c:996 store_temp23() warn:
'32768' 32768 can't fit into 32767 'data->temp_add[nr][index]'Fix by using DIV_ROUND_CLOSEST and clamp_val to convert the values.
While we are at it, modify other macros as well for consistency and
to make the code easier to understand.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
06 Nov, 2012
1 commit
-
These got broken by recent patches fixing checkpatch warnings in these
drivers. The trick is that the patches themselves looked good, but the
source files after applying them do not. That's why I am not a big fan
of using tabs inside comments.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
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
-
The following build warnings are seen with -Wextra.
w83791d.c: In function store_temp_target:
w83791d.c:858:2: warning: comparison of unsigned expression < 0 is always false
w83791d.c: In function store_temp_tolerance:
w83791d.c:920:2: warning: comparison of unsigned expression < 0 is always falseFor store_temp_target, accept negative numbers and clamp to >= 0.
For store_temp_tolerance, drop the unnecessary comparison.Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
22 Jul, 2012
1 commit
-
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Marc Hulsman
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
19 Mar, 2012
2 commits
-
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 insteadModify multi-line comments to follow Documentation/CodingStyle.
Not fixed (false positive):
ERROR: Macros with complex values should be enclosed in parenthesisCc: Charles Spirakis
Cc: Marc Hulsman
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
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
22 Sep, 2011
1 commit
-
gcc -Wextra warns "register is not at beginning of declaration" because the
compiler thinks the parameter has been marked as a 'register' variable, but
the function prototype intended to name the parameter "register" (which is a
reserved keyword).Signed-off-by: Chris Peterson
Acked-by: Marc Hulsman
Signed-off-by: Guenter Roeck
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
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: Marc Hulsman
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 Oct, 2008
4 commits
-
Add support to set target temperature and tolerance for thermal
cruise mode.Signed-off-by: Marc Hulsman
Acked-by: Hans de Goede
Signed-off-by: Jean Delvare -
Add support for pwm_enable.
Signed-off-by: Marc Hulsman
Acked-by: Hans de Goede
Signed-off-by: Jean Delvare -
Add PWM manual control.
Signed-off-by: Marc Hulsman
Acked-by: Hans de Goede
Signed-off-by: Jean Delvare -
Pins fan/pwm 4-5 can be in use as GPIO. If that is the case, do not
create their sysfs-interface.Signed-off-by: Marc Hulsman
Acked-by: Hans de Goede
Signed-off-by: Jean Delvare
15 Aug, 2008
1 commit
-
drivers/hwmon/w83791d.c: In function `w83791d_probe':
drivers/hwmon/w83791d.c:1049: warning: unused variable `val1'Signed-off-by: Michael Borisov
Cc: "Mark M. Hoffman"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
07 Aug, 2008
1 commit
-
Update w83791d with fan bits in vbat mon register (7.48 of the
datasheet). This change allows all fans to have a divisor of 128,
and fixes a problem with incorrectly reported fan speeds.Signed-off-by: Marc Hulsman
Signed-off-by: Jean Delvare
17 Jul, 2008
1 commit
-
The new-style w83791d driver implements the optional detect()
callback to cover the use cases of the legacy driver.Signed-off-by: Jean Delvare
Cc: Marc Hulsman
19 Feb, 2008
1 commit
-
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
1 commit
-
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
19 Oct, 2007
1 commit
-
Found these while looking at printk uses.
Add missing newlines to dev_ uses
Add missing KERN_ prefixes to multiline dev_s
Fixed a wierd->weird spelling typo
Added a newline to a printkSigned-off-by: Joe Perches
Cc: "Luck, Tony"
Cc: Jens Axboe
Cc: Mark M. Hoffman
Cc: Roland Dreier
Cc: Tilman Schmidt
Cc: David Woodhouse
Cc: Jeff Garzik
Cc: Stephen Hemminger
Cc: Greg KH
Cc: Jeremy Fitzhardinge
Cc: Geert Uytterhoeven
Cc: Alessandro Zummo
Cc: David Brownell
Cc: James Smart
Cc: Andrew Vasquez
Cc: "Antonino A. Daplas"
Cc: Evgeniy Polyakov
Cc: Russell King
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Oct, 2007
3 commits
-
The VRM value is not read from chip registers, so there's no need
to update the device data cache before exporting the VRM value to
user-space.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Signed-off-by: Mark M. Hoffman -
Add new sysfs alarm methodology to w83791d driver
Signed-off-by: Charles Spirakis
Acked-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
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 Oct, 2006
1 commit
-
Replace all unchecked calls to device_create_file with a single group
declaration, and one call to sysfs_create_group, and check that one
return status. Also remove the files on device detach.Signed-off-by: Jim Cromie
Signed-off by: Charles Spirakis
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
04 Oct, 2006
1 commit
-
kbuild explicitly includes this at build time.
Signed-off-by: Dave Jones