Fix a reported compilation breakage with gcc 3.4 due to inline

functions being called before their actual definition. Thanks to Greg
Kroah-Hartman for the report.
Also, drop an unused lock.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@3225 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2006-01-09 20:02:21 +00:00
1 parent 337ffc5729
commit 9f9be64fab
1 file changed
+13 -18
+13 -18
View File
@@ -245,7 +245,6 @@ static inline u8 FAN_TO_REG(long rpm, int div)
struct w83792d_data {
struct i2c_client client;
struct semaphore lock;
int sysctl_id;
enum chips type;
@@ -280,15 +279,25 @@ struct w83792d_data {
u8 sf2_levels[3][4]; /* Smart FanII: Fan1,2,3 duty cycle levels */
};
/* Read the w83792d register value, only use bank 0 of the 792 chip */
static inline int
w83792d_read_value(struct i2c_client *client, u8 reg)
{
return i2c_smbus_read_byte_data(client, reg);
}
/* Write value into the w83792d registers, only use bank 0 of the 792 chip */
static inline int
w83792d_write_value(struct i2c_client *client, u8 reg, u8 value)
{
return i2c_smbus_write_byte_data(client, reg, value);
}
static int w83792d_attach_adapter(struct i2c_adapter *adapter);
static int w83792d_detect(struct i2c_adapter *adapter, int address,
unsigned short flags, int kind);
static int w83792d_detach_client(struct i2c_client *client);
static inline int w83792d_read_value(struct i2c_client *client, u8 reg);
static inline int w83792d_write_value(struct i2c_client *client, u8 reg,
u8 value);
static void w83792d_init_client(struct i2c_client *client);
static void w83792d_update_client(struct i2c_client *client);
#ifdef W83792D_DEBUG
@@ -733,20 +742,6 @@ static int w83792d_detach_client(struct i2c_client *client)
return 0;
}
/* Read the w83792d register value, only use bank 0 of the 792 chip */
static inline int
w83792d_read_value(struct i2c_client *client, u8 reg)
{
return i2c_smbus_read_byte_data(client, reg);
}
/* Write value into the w83792d registers, only use bank 0 of the 792 chip */
static inline int
w83792d_write_value(struct i2c_client *client, u8 reg, u8 value)
{
return i2c_smbus_write_byte_data(client, reg, value);
}
/* Called when we have found a new W83792D. */
static void w83792d_init_client(struct i2c_client *client)
{