forked from Minki/linux
hwmon: (w83627ehf) Use swap() in w82627ehf_swap_tempreg()
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jean Delvare <jdelvare@suse.de>
This commit is contained in:
parent
97607f9882
commit
ffe3df5353
@ -1937,27 +1937,11 @@ static inline void w83627ehf_init_device(struct w83627ehf_data *data,
|
|||||||
static void w82627ehf_swap_tempreg(struct w83627ehf_data *data,
|
static void w82627ehf_swap_tempreg(struct w83627ehf_data *data,
|
||||||
int r1, int r2)
|
int r1, int r2)
|
||||||
{
|
{
|
||||||
u16 tmp;
|
swap(data->temp_src[r1], data->temp_src[r2]);
|
||||||
|
swap(data->reg_temp[r1], data->reg_temp[r2]);
|
||||||
tmp = data->temp_src[r1];
|
swap(data->reg_temp_over[r1], data->reg_temp_over[r2]);
|
||||||
data->temp_src[r1] = data->temp_src[r2];
|
swap(data->reg_temp_hyst[r1], data->reg_temp_hyst[r2]);
|
||||||
data->temp_src[r2] = tmp;
|
swap(data->reg_temp_config[r1], data->reg_temp_config[r2]);
|
||||||
|
|
||||||
tmp = data->reg_temp[r1];
|
|
||||||
data->reg_temp[r1] = data->reg_temp[r2];
|
|
||||||
data->reg_temp[r2] = tmp;
|
|
||||||
|
|
||||||
tmp = data->reg_temp_over[r1];
|
|
||||||
data->reg_temp_over[r1] = data->reg_temp_over[r2];
|
|
||||||
data->reg_temp_over[r2] = tmp;
|
|
||||||
|
|
||||||
tmp = data->reg_temp_hyst[r1];
|
|
||||||
data->reg_temp_hyst[r1] = data->reg_temp_hyst[r2];
|
|
||||||
data->reg_temp_hyst[r2] = tmp;
|
|
||||||
|
|
||||||
tmp = data->reg_temp_config[r1];
|
|
||||||
data->reg_temp_config[r1] = data->reg_temp_config[r2];
|
|
||||||
data->reg_temp_config[r2] = tmp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user