mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-31 13:10:30 +00:00
Misc cleanups inspired from Linux 2.6.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2192 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
86b9b4a477
commit
1a665e49ed
2 files changed
+8
-8
No files matched your search
+3
-2
@@ -79,7 +79,7 @@ SENSORS_INSMOD_1(lm83);
|
||||
#define LM83_REG_W_TCRIT 0x5A
|
||||
|
||||
/*
|
||||
* Conversions, initial values and various macros
|
||||
* Conversions and various macros
|
||||
* The LM83 uses signed 8-bit values.
|
||||
*/
|
||||
|
||||
@@ -285,7 +285,7 @@ static int lm83_detect(struct i2c_adapter *adapter, int address, unsigned
|
||||
& 0x41) != 0x00))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printk("lm83.o: LM83 detection failed at 0x%02x.\n",
|
||||
printk(KERN_DEBUG "lm83.o: Detection failed at 0x%02x.\n",
|
||||
address);
|
||||
#endif
|
||||
goto ERROR1;
|
||||
@@ -412,6 +412,7 @@ static void lm83_update_client(struct i2c_client *client)
|
||||
data->alarms =
|
||||
i2c_smbus_read_byte_data(client, LM83_REG_R_STATUS1) +
|
||||
(i2c_smbus_read_byte_data(client, LM83_REG_R_STATUS2) << 8);
|
||||
|
||||
data->last_updated = jiffies;
|
||||
data->valid = 1;
|
||||
}
|
||||
|
||||
+5
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* lm90.c - Part of lm_sensors, Linux kernel modules for hardware
|
||||
* monitoring
|
||||
* Copyright (c) 2003 Jean Delvare <khali@linux-fr.org>
|
||||
* Copyright (C) 2003 Jean Delvare <khali@linux-fr.org>
|
||||
*
|
||||
* Based on the lm83 driver. The LM90 is a sensor chip made by National
|
||||
* Semiconductor. It reports up to two temperatures (its own plus up to
|
||||
@@ -98,7 +98,7 @@ SENSORS_INSMOD_2(lm90, adm1032);
|
||||
#define LM90_REG_W_TCRIT_HYST 0x21
|
||||
|
||||
/*
|
||||
* Conversions, initial values and various macros
|
||||
* Conversions and various macros
|
||||
* The LM90 uses signed 8-bit values for the local temperatures,
|
||||
* and signed 11-bit values for the remote temperatures (except
|
||||
* T_CRIT). The 11-bit conversion formulas may not round negative
|
||||
@@ -138,7 +138,7 @@ static void lm90_alarms(struct i2c_client *client, int operation,
|
||||
/*
|
||||
* Driver data (common to all clients)
|
||||
*/
|
||||
|
||||
|
||||
static struct i2c_driver lm90_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "LM90/ADM1032 sensor driver",
|
||||
@@ -229,7 +229,6 @@ static int lm90_attach_adapter(struct i2c_adapter *adapter)
|
||||
* The following function does more than just detection. If detection
|
||||
* succeeds, it also registers the new chip.
|
||||
*/
|
||||
|
||||
static int lm90_detect(struct i2c_adapter *adapter, int address,
|
||||
unsigned short flags, int kind)
|
||||
{
|
||||
@@ -298,7 +297,7 @@ static int lm90_detect(struct i2c_adapter *adapter, int address,
|
||||
|| reg_convrate > 0x0A)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printk("lm90.o: Detection failed at 0x%02x.\n",
|
||||
printk(KERN_DEBUG "lm90.o: Detection failed at 0x%02x.\n",
|
||||
address);
|
||||
#endif
|
||||
goto ERROR1;
|
||||
@@ -413,7 +412,7 @@ static void lm90_init_client(struct i2c_client *client)
|
||||
u8 config;
|
||||
|
||||
/*
|
||||
* Starts the conversions.
|
||||
* Start the conversions.
|
||||
*/
|
||||
|
||||
i2c_smbus_write_byte_data(client, LM90_REG_W_CONVRATE,
|
||||
|
||||
Reference in new issue
Block a user