type_name = "gl523sm";
} else if (kind == mc1066) {
type_name = "mc1066";
- } else {
- dev_err(&adapter->dev, "Internal error: unknown kind (%d)?!?",
- kind);
- goto error1;
}
/* Fill in the remaining client fields and put it into the global list */
static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
/* Insmod parameters */
-SENSORS_INSMOD_4(it87, it8705, it8712, sis950);
+SENSORS_INSMOD_1(it87);
/* Update battery voltage after every reading if true */
if (kind == it87) {
name = "it87";
- } /* else if (kind == it8712) {
- name = "it8712";
- } */ else {
- dev_dbg(&adapter->dev, "Internal error: unknown kind (%d)?!?",
- kind);
- goto ERROR1;
}
/* Fill in the remaining client fields and put it into the global list */
}
/* The 8705 does not have VID capability */
- /*if (data->type == it8712) {
- data->vid = it87_read_value(client, IT87_REG_VID);
- data->vid &= 0x1f;
- }
- else */ {
- data->vid = 0x1f;
- }
+ data->vid = 0x1f;
i = it87_read_value(client, IT87_REG_FAN_DIV);
data->fan_div[0] = i & 0x07;
struct i2c_client *new_client;
struct lm75_data *data;
int err = 0;
- const char *name;
+ const char *name = "";
/* Make sure we aren't probing the ISA bus!! This is just a safety check
at this moment; i2c_detect really won't call us. */
if (kind == lm75) {
name = "lm75";
- } else {
- dev_dbg(&adapter->dev, "Internal error: unknown kind (%d)?!?",
- kind);
- goto exit_free;
}
/* Fill in the remaining client fields and put it into the global list */
client_name = "lm78-j";
} else if (kind == lm79) {
client_name = "lm79";
- } else {
- dev_dbg(&adapter->dev, "Internal error: unknown kind (%d)?!?",
- kind);
- err = -ENODEV;
- goto ERROR2;
}
/* Fill in the remaining client fields and put into the global list */
type_name = "adm1027";
} else if ( kind == adt7463 ) {
type_name = "adt7463";
- } else {
- dev_dbg(&adapter->dev, "Internal error, invalid kind (%d)!", kind);
- err = -EFAULT ;
- goto ERROR1;
}
strlcpy(new_client->name, type_name, I2C_NAME_SIZE);
kind = w83627thf;
else if(val == W637_DEVID)
kind = w83637hf;
+ else {
+ dev_info(&adapter->dev,
+ "Unsupported chip (dev_id=0x%02X).\n", val);
+ goto ERROR1;
+ }
superio_select(W83627HF_LD_HWM);
if((val = 0x01 & superio_inb(WINB_ACT_REG)) == 0)
client_name = "w83697hf";
} else if (kind == w83637hf) {
client_name = "w83637hf";
- } else {
- dev_err(&new_client->dev, "Internal error: unknown "
- "kind (%d)?!?", kind);
- err = -ENODEV;
- goto ERROR2;
}
/* Fill in the remaining client fields and put into the global list */
{
int i, val1 = 0, id;
int err;
- const char *client_name;
+ const char *client_name = "";
struct w83781d_data *data = i2c_get_clientdata(new_client);
data->lm75[0] = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
client_name = "w83627hf subclient";
else if (kind == as99127f)
client_name = "as99127f subclient";
- else
- client_name = "unknown subclient?";
for (i = 0; i <= 1; i++) {
/* store all data in w83781d */
goto ERROR0;
}
+ /* Prevent users from forcing a kind for a bus it isn't supposed
+ to possibly be on */
+ if (is_isa && (kind == as99127f || kind == w83783s)) {
+ dev_err(&adapter->dev,
+ "Cannot force I2C-only chip for ISA address 0x%02x.\n",
+ address);
+ err = -EINVAL;
+ goto ERROR0;
+ }
+ if (!is_isa && kind == w83697hf) {
+ dev_err(&adapter->dev,
+ "Cannot force ISA-only chip for I2C address 0x%02x.\n",
+ address);
+ err = -EINVAL;
+ goto ERROR0;
+ }
+
if (is_isa)
if (!request_region(address, W83781D_EXTENT, "w83781d")) {
err = -EBUSY;
client_name = "as99127f";
} else if (kind == w83697hf) {
client_name = "w83697hf";
- } else {
- dev_err(&new_client->dev, "Internal error: unknown "
- "kind (%d)?!?", kind);
- err = -ENODEV;
- goto ERROR2;
}
/* Fill in the remaining client fields and put into the global list */