mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-23 20:11:42 +00:00
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:
1 parent
337ffc5729
commit
9f9be64fab
1 file changed
+13
-18
+13
-18
@@ -245,7 +245,6 @@ static inline u8 FAN_TO_REG(long rpm, int div)
|
|||||||
|
|
||||||
struct w83792d_data {
|
struct w83792d_data {
|
||||||
struct i2c_client client;
|
struct i2c_client client;
|
||||||
struct semaphore lock;
|
|
||||||
int sysctl_id;
|
int sysctl_id;
|
||||||
enum chips type;
|
enum chips type;
|
||||||
|
|
||||||
@@ -280,15 +279,25 @@ struct w83792d_data {
|
|||||||
u8 sf2_levels[3][4]; /* Smart FanII: Fan1,2,3 duty cycle levels */
|
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_attach_adapter(struct i2c_adapter *adapter);
|
||||||
static int w83792d_detect(struct i2c_adapter *adapter, int address,
|
static int w83792d_detect(struct i2c_adapter *adapter, int address,
|
||||||
unsigned short flags, int kind);
|
unsigned short flags, int kind);
|
||||||
static int w83792d_detach_client(struct i2c_client *client);
|
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_init_client(struct i2c_client *client);
|
||||||
static void w83792d_update_client(struct i2c_client *client);
|
static void w83792d_update_client(struct i2c_client *client);
|
||||||
#ifdef W83792D_DEBUG
|
#ifdef W83792D_DEBUG
|
||||||
@@ -733,20 +742,6 @@ static int w83792d_detach_client(struct i2c_client *client)
|
|||||||
return 0;
|
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. */
|
/* Called when we have found a new W83792D. */
|
||||||
static void w83792d_init_client(struct i2c_client *client)
|
static void w83792d_init_client(struct i2c_client *client)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user