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:
Jean Delvare committed 2004-04-13 17:52:59 +00:00
1 parent 26aefc15ba
commit ff48783182
8 files changed
+26 -80

No files matched your search

+2 -10
View File
@@ -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