From 1a665e49edc3dba76b3ab22d34b22d99f17d5da1 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 29 Dec 2003 19:26:17 +0000 Subject: [PATCH] Misc cleanups inspired from Linux 2.6. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2192 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/lm83.c | 5 +++-- kernel/chips/lm90.c | 11 +++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/chips/lm83.c b/kernel/chips/lm83.c index 18838a65..edf81615 100644 --- a/kernel/chips/lm83.c +++ b/kernel/chips/lm83.c @@ -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; } diff --git a/kernel/chips/lm90.c b/kernel/chips/lm90.c index 4eeb509b..7702a21e 100644 --- a/kernel/chips/lm90.c +++ b/kernel/chips/lm90.c @@ -1,7 +1,7 @@ /* * lm90.c - Part of lm_sensors, Linux kernel modules for hardware * monitoring - * Copyright (c) 2003 Jean Delvare + * Copyright (C) 2003 Jean Delvare * * 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,