From e721fcf4acca81e4001e68a08b688de33b8ae1f0 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Mon, 22 Mar 1999 00:45:08 +0000 Subject: [PATCH] Minor cosmetic changes to maxlife driver, to make it compile cleanly with WARN=1 git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@332 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/maxilife.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/kernel/chips/maxilife.c b/kernel/chips/maxilife.c index 1cfda0da..08616422 100644 --- a/kernel/chips/maxilife.c +++ b/kernel/chips/maxilife.c @@ -35,7 +35,7 @@ maxi_version=0 is the default */ -static const char *version = "1.00 25/2/99 Fons Rademakers"; +static const char *version_str = "1.00 25/2/99 Fons Rademakers"; #include @@ -53,7 +53,7 @@ static const char *version = "1.00 25/2/99 Fons Rademakers"; #include "compat.h" -/*#define AUTODETECT /* try to autodetect MaxiLife version */ +#undef AUTODETECT /* try to autodetect MaxiLife version */ #define NOWRITE /* don't allow writing to MaxiLife registers */ @@ -169,7 +169,9 @@ static void maxi_inc_use (struct i2c_client *client); static void maxi_dec_use (struct i2c_client *client); static int maxi_read_value(struct i2c_client *client, u8 register); +#ifndef NOWRITE static int maxi_write_value(struct i2c_client *client, u8 register, u8 value); +#endif static void maxi_update_client(struct i2c_client *client); static void maxi_init_client(struct i2c_client *client); @@ -269,7 +271,9 @@ int maxi_detach_client(struct i2c_client *client) int maxi_detect_smbus(struct i2c_adapter *adapter) { +#ifdef AUTODETECT u8 biosctl; +#endif int address, err; struct i2c_client *new_client; enum maxi_type type; @@ -455,11 +459,13 @@ int maxi_read_value(struct i2c_client *client, u8 reg) return smbus_read_byte_data(client->adapter, client->addr, reg); } +#ifndef NOWRITE /* Write byte to specified register. */ int maxi_write_value(struct i2c_client *client, u8 reg, u8 value) { return smbus_write_byte_data(client->adapter, client->addr, reg, value); } +#endif /* Called when we have found a new MaxiLife. It should set limits, etc. */ void maxi_init_client(struct i2c_client *client) @@ -709,7 +715,7 @@ int maxi_init(void) { int res; - printk("maxilife: Version %s (lm_sensors %s (%s))\n", version, + printk("maxilife: Version %s (lm_sensors %s (%s))\n", version_str, LM_VERSION, LM_DATE); maxi_initialized = 0;