Commit 6214d5da authored by Jean Delvare's avatar Jean Delvare Committed by Greg Kroah-Hartman

[PATCH] I2C: Drop out-of-date code in w83781d and w83627hf

Here is a simple patch which drops some out-of-date code in the w83781d
and w83627hf i2c chip drivers. These bits are left over from the times
when chip drivers were setting default limits at init.


Signed-off-by: Jean Delvare <khali at linux-fr dot org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 6b6f1ba5
......@@ -1240,7 +1240,7 @@ static int w83627hf_write_value(struct i2c_client *client, u16 reg, u16 value)
static void w83627hf_init_client(struct i2c_client *client)
{
struct w83627hf_data *data = i2c_get_clientdata(client);
int vid = 0, i;
int i;
int type = data->type;
u8 tmp;
......@@ -1284,9 +1284,6 @@ static void w83627hf_init_client(struct i2c_client *client)
data->vrm = DEFAULT_VRM;
}
if (type != w83697hf)
vid = vid_from_reg(vid, data->vrm);
tmp = w83627hf_read_value(client, W83781D_REG_SCFG1);
for (i = 1; i <= 3; i++) {
if (!(tmp & BIT_SCFG1[i - 1])) {
......
......@@ -1491,7 +1491,7 @@ static void
w83781d_init_client(struct i2c_client *client)
{
struct w83781d_data *data = i2c_get_clientdata(client);
int vid = 0, i, p;
int i, p;
int type = data->type;
u8 tmp;
......@@ -1513,14 +1513,7 @@ w83781d_init_client(struct i2c_client *client)
w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0);
}
if (type != w83697hf) {
vid = w83781d_read_value(client, W83781D_REG_VID_FANDIV) & 0x0f;
vid |=
(w83781d_read_value(client, W83781D_REG_CHIPID) & 0x01) <<
4;
data->vrm = DEFAULT_VRM;
vid = vid_from_reg(vid, data->vrm);
}
data->vrm = 82;
if ((type != w83781d) && (type != as99127f)) {
tmp = w83781d_read_value(client, W83781D_REG_SCFG1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment