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
22 Jul, 2012
1 commit
-
Convert to use devm_ functions to reduce code size and simplify the code.
Signed-off-by: Guenter Roeck
Acked-by: Jean Delvare
10 Apr, 2012
1 commit
-
Some configurations produce the following compiler warning:
drivers/hwmon/smsc47m1.c: In function 'sm_smsc47m1_init':
drivers/hwmon/smsc47m1.c:938: warning: 'address' may be used uninitialized in this functionWhile this is a false positive, it can easily be fixed by overloading the return
value from smsc47m1_find with both address and error return code (the address
is an unsigned short and thus never negative). This also reduces module size by
a few bytes (46 bytes for x86_64).Signed-off-by: Guenter Roeck
Reviewed-by: Robert Coulson
19 Mar, 2012
2 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)
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 * constModify 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 loopCc: Jean Delvare
Signed-off-by: Guenter Roeck -
Fix checkpatch issue:
ERROR: do not use assignment in if conditionReplace repeated calls to device_create_file() with calls to sysfs_create_group.
Cc: Jean Delvare
Signed-off-by: Guenter Roeck
09 Jan, 2011
1 commit
-
Added #define pr_fmt KBUILD_MODNAME ": " fmt
Converted printks to pr_
Coalesced any long formats
Removed prefixes from formatsSigned-off-by: Joe Perches
Signed-off-by: Guenter Roeck
25 Jan, 2010
1 commit
-
smsc47m1_restore is called from sm_smsc47m1_exit, which is an __exit
function, so it can't be __init.Signed-off-by: Jeff Mahoney
Signed-off-by: Jean Delvare
17 Dec, 2009
3 commits
-
If the address is set but the device isn't enabled, attempt to enable
it. If it won't work for any reason (resource conflict, no function
enabled) the initial state is restored. The initial state is also
restored on module unloading.Signed-off-by: Jean Delvare
Tested-by: Sean Fidler -
If an error occurs during probing, there's no point in keeping the
module in memory. Better fail the module loading early to make the
problem more visible.Signed-off-by: Jean Delvare
Tested-by: Sean Fidler -
The I/O area of the SMSC LPC47M1xx chips which we use, gives access to
a lot of registers, some of which are related to fan speed monitoring
and control, but many are not. At the moment, the smsc47m1 driver
requests the whole I/O port range. This could easily result in
resource conflicts with either ACPI or other drivers.Request only the I/O ports we really use, to prevent such conflicts.
Signed-off-by: Jean Delvare
Tested-by: Sean Fidler
15 Sep, 2009
1 commit
-
Drivers should be including instead of .
Signed-off-by: H Hartley Sweeten
Cc: Alistair John Strachan
Cc: Nicolas Boichat
Cc: Juerg Haefliger
Cc: Frank Seidel
Acked-by: Jim Cromie
Cc: "Mark M. Hoffman"
Cc: Roger Lucas
Signed-off-by: Jean Delvare
28 Jul, 2009
1 commit
-
The SMSC LPC47M233 and LPC47M292 chips have the same device ID but
are not compatible.Signed-off-by: Jean Delvare
Cc: Juerg Haefliger
Acked-by: Hans de Goede
07 Jan, 2009
1 commit
-
Check for ACPI resource conflicts in hwmon drivers. I've included
all Super-I/O and PCI drivers.I've voluntarily left out:
* Vendor-specific drivers: if they conflicted on any system, this would
pretty much mean that they conflict on all systems, and we would know
by now.
* Legacy ISA drivers (lm78 and w83781d): they only support chips found
on old designs were ACPI either wasn't supported or didn't deal with
thermal management.
* Drivers accessing the I/O resources indirectly (e.g. through SMBus):
the checks are already done where they belong, i.e. in the bus drivers.Signed-off-by: Jean Delvare
Acked-by: David Hubbard
17 Feb, 2008
1 commit
-
The new libsensors needs these individual alarm files.
Signed-off-by: Jean Delvare
Acked-by: Juerg Haefliger
Signed-off-by: Mark M. Hoffman
08 Feb, 2008
1 commit
-
While it is possible to force SMBus-based hardware monitoring chip
drivers to drive a not officially supported device, we do not have this
possibility for Super-I/O-based drivers. That's unfortunate because
sometimes newer chips are fully compatible and just forcing the driver
to load would work. Instead of that we have to tell the users to
recompile the kernel driver, which isn't an easy task for everyone.So, I propose that we add a module parameter to all Super-I/O based
hardware monitoring drivers, letting advanced users force the driver
to load on their machine. The user has to provide the device ID of a
supposedly compatible device. This requires looking at the source code or
a datasheet, so I am confident that users can't randomly force a driver
without knowing what they are doing. Thus this should be relatively safe.As you can see from the code, the implementation is pretty simple and
unintrusive.Signed-off-by: Jean Delvare
Acked-by: Hans de Goede
Signed-off-by: Mark M. Hoffman
10 Oct, 2007
2 commits
-
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 -
It's confusing to display debugging messages for fan3 and pwm3 for
chips which don't have them.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
13 Aug, 2007
1 commit
-
The smsc47m1 driver no longer creates the name attribute used by
libsensors to identify chip types. It was lost during the conversion
to a platform driver. I was fooled by the fact that we do have a
group with all attributes, but only to delete them all at once. The
group is not used to create the attributes, so we have to explicitly
create the name attribute.This fixes lm-sensors ticket #2236:
http://lm-sensors.org/ticket/2236Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
31 Jul, 2007
1 commit
-
On Sun, 22 Jul 2007 00:30:56 +0200, Gabriel C wrote:
> I noticed this warnings on current git:
>
> drivers/hwmon/pc87360.c:1082: warning: 'pc87360_remove' defined but not used
> drivers/hwmon/sis5595.c:580: warning: 'sis5595_remove' defined but not used
> drivers/hwmon/smsc47m1.c:608: warning: 'smsc47m1_remove' defined but not used
> drivers/hwmon/via686a.c:648: warning: 'via686a_remove' defined but not used
> drivers/hwmon/vt8231.c:755: warning: 'vt8231_remove' defined but not usedSigned-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman
20 Jul, 2007
2 commits
-
Fix a potential race condition when some hardware monitoring platform
drivers are being unloaded. I believe that the driver data pointer
shouldn't be cleared before all the sysfs files are removed, otherwise
a sysfs callback might attempt to dereference a NULL pointer. I'm not
sure exactly what the driver core protects drivers against, so let's
play it safe.While we're here, clear the driver data pointer when probe fails, so
as to not leave an invalid pointer behind us.Signed-off-by: Jean Delvare
Signed-off-by: Mark M. Hoffman -
Use platform_device_add_data() in hardware monitoring drivers. This
makes the code nicer and smaller too. Reported by David Hubbard.Signed-off-by: Jean Delvare
Cc: David Hubbard
08 May, 2007
5 commits
-
This lets us get rid of macro-generated functions and shrinks the
driver size by about 7%.Signed-off-by: Jean Delvare
-
Also use pr_info instead of printk.
Signed-off-by: Jean Delvare
-
Convert the smsc47m1 driver from the nonsensical i2c-isa hack to a
regular platform driver.Signed-off-by: Jean Delvare
-
The smsc47m1 driver uses a mutex to protect the accesses to the
hardware registers. It really doesn't need any protection, as the
register space is flat. Get rid of that mutex for a smaller and
faster driver.Signed-off-by: Jean Delvare
-
The new SMSC LPC47M292 Super-I/O chip is a bit different from the
previous ones, it supports a 3rd fan, but unfortunately the pin
configuration registers are different.Signed-off-by: Jean Delvare
19 Oct, 2006
1 commit
-
The SMSC LPC47M112 Super-I/O chip appears to be compatible with the
LPC47M10x and LPC47M13x as far as hardware monitoring is concerned.
The device ID is even the same, so it's really only a documentation
update.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
29 Sep, 2006
2 commits
-
hwmon: Fix unchecked return status, SMSC chips
Fix up 2 more hwmon drivers so that they no longer ignore return
status from device_create_file().Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
smsc47m1: dev_warn fix
We can't use dev_warn on an i2c client before it is attached.
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
27 Sep, 2006
1 commit
-
i2c-isa: Restore driver owner
Commit 2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 back in January
2006 was a bit overzealous. It removed .owner from all i2c drivers,
including i2c-isa ones, while they still need it.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
27 Jun, 2006
1 commit
-
acquired (aquired)
contiguous (contigious)
successful (succesful, succesfull)
surprise (suprise)
whether (weather)
some other misspellingsSigned-off-by: Andreas Mohr
Signed-off-by: Adrian Bunk
24 Mar, 2006
1 commit
-
convert drivers/hwmon/*.c semaphore use to mutexes.
the conversion was generated via scripts, and the result was validated
automatically via a script as well.all affected hwmon drivers were build-tested.
Signed-off-by: Ingo Molnar
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
06 Jan, 2006
2 commits
-
Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers. This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)Signed-off-by: Greg Kroah-Hartman
Cc: Jean Delvare -
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.This patch updates the hwmon drivers.
Signed-off-by: Laurent Riffard
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
29 Oct, 2005
2 commits
-
The SMSC LPC47M997 Super-I/O chip seems to be compatible with the
LPC47M192, so it is supported by the smsc47m1 driver.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Use kzalloc instead of kmalloc+memset in all hardware monitoring
drivers.Signed-off-by: Deepak Saxena
Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
10 Sep, 2005
1 commit
-
Update the head comment of the smsc47m1 driver to mention all the
supported devices.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman
06 Sep, 2005
3 commits
-
The only thing left in i2c-sensor.h are module parameter definition
macros. It's only an extension of what i2c.h offers, and this extension
is not sensors-specific. As a matter of fact, a few non-sensors drivers
use them. So we better merge them in i2c.h, and get rid of i2c-sensor.h
altogether.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
Super-I/O find functions in hardware monitoring drivers can be tagged
__init as they are only called from functions themselves tagged __init.
Two of them (smsc47b397 and w83627ehf) already do, but the other four
of them (it87, pc87360, smsc47m1 and w83627hf) did not.This saves a few bytes of memory after the drivers are loaded, 192 in
the case of the it87 driver.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman -
We could refactor the error message 34 different i2c drivers print if
i2c_detach_client() fails in this function itself. Saves quite a few
lines of code. Documentation is updated to reflect that change.Note that this patch should be applied after Rudolf Marek's w83792d
patches.Signed-off-by: Jean Delvare
Signed-off-by: Greg Kroah-Hartman