mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-04 21:58:18 +00:00
Use kernel's swab16 instead of our own function.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2437 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
26aefc15ba
commit
ff48783182
8 files changed
+26
-80
No files matched your search
@@ -102,7 +102,6 @@ static int smartbatt_detach_client(struct i2c_client *client);
|
||||
|
||||
static int smartbatt_read(struct i2c_client *client, u8 reg);
|
||||
#if 0
|
||||
static u16 swap_bytes(u16 val);
|
||||
static int smartbatt_write_value(struct i2c_client *client, u8 reg, u16 value);
|
||||
#endif
|
||||
static void smartbatt_temp(struct i2c_client *client, int operation,
|
||||
@@ -321,14 +320,6 @@ static int smartbatt_detach_client(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Why swap bytes? */
|
||||
static u16 swap_bytes(u16 val)
|
||||
{
|
||||
return (val >> 8) | (val << 8);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int smartbatt_read(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
int n = COMM_TIMEOUT;
|
||||
@@ -342,7 +333,8 @@ static int smartbatt_read(struct i2c_client *client, u8 reg)
|
||||
#if 0
|
||||
static int smartbatt_write_value(struct i2c_client *client, u8 reg, u16 value)
|
||||
{
|
||||
return i2c_smbus_write_word_data(client, reg, swap_bytes(value));
|
||||
/* Why swap bytes? */
|
||||
return i2c_smbus_write_word_data(client, reg, swab16(value));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user