i2c: Drop the kind parameter from detect callbacks
[linux-2.6-block.git] / drivers / misc / ics932s401.c
index 6e43ab4231ae9924661d0f3b663e20cb5577c6c0..75097ec43edda1bb679108c8d721bc704f09efcb 100644 (file)
@@ -106,7 +106,7 @@ struct ics932s401_data {
 
 static int ics932s401_probe(struct i2c_client *client,
                         const struct i2c_device_id *id);
-static int ics932s401_detect(struct i2c_client *client, int kind,
+static int ics932s401_detect(struct i2c_client *client,
                          struct i2c_board_info *info);
 static int ics932s401_remove(struct i2c_client *client);
 
@@ -413,36 +413,29 @@ static ssize_t show_spread(struct device *dev,
 }
 
 /* Return 0 if detection is successful, -ENODEV otherwise */
-static int ics932s401_detect(struct i2c_client *client, int kind,
+static int ics932s401_detect(struct i2c_client *client,
                          struct i2c_board_info *info)
 {
        struct i2c_adapter *adapter = client->adapter;
+       int vendor, device, revision;
 
        if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
                return -ENODEV;
 
-       if (kind <= 0) {
-               int vendor, device, revision;
-
-               vendor = i2c_smbus_read_word_data(client,
-                                                 ICS932S401_REG_VENDOR_REV);
-               vendor >>= 8;
-               revision = vendor >> ICS932S401_REV_SHIFT;
-               vendor &= ICS932S401_VENDOR_MASK;
-               if (vendor != ICS932S401_VENDOR)
-                       return -ENODEV;
-
-               device = i2c_smbus_read_word_data(client,
-                                                 ICS932S401_REG_DEVICE);
-               device >>= 8;
-               if (device != ICS932S401_DEVICE)
-                       return -ENODEV;
-
-               if (revision != ICS932S401_REV)
-                       dev_info(&adapter->dev, "Unknown revision %d\n",
-                                revision);
-       } else
-               dev_dbg(&adapter->dev, "detection forced\n");
+       vendor = i2c_smbus_read_word_data(client, ICS932S401_REG_VENDOR_REV);
+       vendor >>= 8;
+       revision = vendor >> ICS932S401_REV_SHIFT;
+       vendor &= ICS932S401_VENDOR_MASK;
+       if (vendor != ICS932S401_VENDOR)
+               return -ENODEV;
+
+       device = i2c_smbus_read_word_data(client, ICS932S401_REG_DEVICE);
+       device >>= 8;
+       if (device != ICS932S401_DEVICE)
+               return -ENODEV;
+
+       if (revision != ICS932S401_REV)
+               dev_info(&adapter->dev, "Unknown revision %d\n", revision);
 
        strlcpy(info->type, "ics932s401", I2C_NAME_SIZE);