Skip to content

Commit

Permalink
i2c: Drop the kind parameter from detect callbacks
Browse files Browse the repository at this point in the history
The "kind" parameter always has value -1, and nobody is using it any
longer, so we can remove it.

Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
  • Loading branch information
Jean Delvare committed Dec 14, 2009
1 parent f405425 commit 310ec79
Show file tree
Hide file tree
Showing 49 changed files with 84 additions and 100 deletions.
4 changes: 2 additions & 2 deletions drivers/hwmon/adm1021.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct adm1021_data {

static int adm1021_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adm1021_detect(struct i2c_client *client, int kind,
static int adm1021_detect(struct i2c_client *client,
struct i2c_board_info *info);
static void adm1021_init_client(struct i2c_client *client);
static int adm1021_remove(struct i2c_client *client);
Expand Down Expand Up @@ -284,7 +284,7 @@ static const struct attribute_group adm1021_group = {
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm1021_detect(struct i2c_client *client, int kind,
static int adm1021_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adm1025.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static const int in_scale[6] = { 2500, 2250, 3300, 5000, 12000, 3300 };

static int adm1025_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adm1025_detect(struct i2c_client *client, int kind,
static int adm1025_detect(struct i2c_client *client,
struct i2c_board_info *info);
static void adm1025_init_client(struct i2c_client *client);
static int adm1025_remove(struct i2c_client *client);
Expand Down Expand Up @@ -409,7 +409,7 @@ static const struct attribute_group adm1025_group_in4 = {
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm1025_detect(struct i2c_client *client, int kind,
static int adm1025_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adm1026.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct adm1026_data {

static int adm1026_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adm1026_detect(struct i2c_client *client, int kind,
static int adm1026_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int adm1026_remove(struct i2c_client *client);
static int adm1026_read_value(struct i2c_client *client, u8 reg);
Expand Down Expand Up @@ -1650,7 +1650,7 @@ static const struct attribute_group adm1026_group_in8_9 = {
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm1026_detect(struct i2c_client *client, int kind,
static int adm1026_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adm1029.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static const u8 ADM1029_REG_FAN_DIV[] = {

static int adm1029_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adm1029_detect(struct i2c_client *client, int kind,
static int adm1029_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int adm1029_remove(struct i2c_client *client);
static struct adm1029_data *adm1029_update_device(struct device *dev);
Expand Down Expand Up @@ -297,7 +297,7 @@ static const struct attribute_group adm1029_group = {
*/

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm1029_detect(struct i2c_client *client, int kind,
static int adm1029_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adm1031.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ struct adm1031_data {

static int adm1031_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adm1031_detect(struct i2c_client *client, int kind,
static int adm1031_detect(struct i2c_client *client,
struct i2c_board_info *info);
static void adm1031_init_client(struct i2c_client *client);
static int adm1031_remove(struct i2c_client *client);
Expand Down Expand Up @@ -813,7 +813,7 @@ static const struct attribute_group adm1031_group_opt = {
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm1031_detect(struct i2c_client *client, int kind,
static int adm1031_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adm9240.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static inline unsigned int AOUT_FROM_REG(u8 reg)

static int adm9240_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adm9240_detect(struct i2c_client *client, int kind,
static int adm9240_detect(struct i2c_client *client,
struct i2c_board_info *info);
static void adm9240_init_client(struct i2c_client *client);
static int adm9240_remove(struct i2c_client *client);
Expand Down Expand Up @@ -545,7 +545,7 @@ static const struct attribute_group adm9240_group = {
/*** sensor chip detect and driver install ***/

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adm9240_detect(struct i2c_client *new_client, int kind,
static int adm9240_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = new_client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/ads7828.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct ads7828_data {
};

/* Function declaration - necessary due to function dependencies */
static int ads7828_detect(struct i2c_client *client, int kind,
static int ads7828_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int ads7828_probe(struct i2c_client *client,
const struct i2c_device_id *id);
Expand Down Expand Up @@ -187,7 +187,7 @@ static struct i2c_driver ads7828_driver = {
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int ads7828_detect(struct i2c_client *client, int kind,
static int ads7828_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adt7462.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ struct adt7462_data {

static int adt7462_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adt7462_detect(struct i2c_client *client, int kind,
static int adt7462_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int adt7462_remove(struct i2c_client *client);

Expand Down Expand Up @@ -1902,7 +1902,7 @@ static struct attribute *adt7462_attr[] =
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adt7462_detect(struct i2c_client *client, int kind,
static int adt7462_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adt7470.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ struct adt7470_data {

static int adt7470_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adt7470_detect(struct i2c_client *client, int kind,
static int adt7470_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int adt7470_remove(struct i2c_client *client);

Expand Down Expand Up @@ -1225,7 +1225,7 @@ static struct attribute *adt7470_attr[] =
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adt7470_detect(struct i2c_client *client, int kind,
static int adt7470_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/adt7473.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ struct adt7473_data {

static int adt7473_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int adt7473_detect(struct i2c_client *client, int kind,
static int adt7473_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int adt7473_remove(struct i2c_client *client);

Expand Down Expand Up @@ -1085,7 +1085,7 @@ static struct attribute *adt7473_attr[] =
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int adt7473_detect(struct i2c_client *client, int kind,
static int adt7473_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/adt7475.c
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ static struct attribute_group in4_attr_group = { .attrs = in4_attrs };
static struct attribute_group in5_attr_group = { .attrs = in5_attrs };
static struct attribute_group vid_attr_group = { .attrs = vid_attrs };

static int adt7475_detect(struct i2c_client *client, int kind,
static int adt7475_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/asb100.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static void asb100_write_value(struct i2c_client *client, u16 reg, u16 val);

static int asb100_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int asb100_detect(struct i2c_client *client, int kind,
static int asb100_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int asb100_remove(struct i2c_client *client);
static struct asb100_data *asb100_update_device(struct device *dev);
Expand Down Expand Up @@ -697,7 +697,7 @@ static int asb100_detect_subclients(struct i2c_client *client)
}

/* Return 0 if detection is successful, -ENODEV otherwise */
static int asb100_detect(struct i2c_client *client, int kind,
static int asb100_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
5 changes: 2 additions & 3 deletions drivers/hwmon/atxp1.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ static int atxp1_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int atxp1_remove(struct i2c_client *client);
static struct atxp1_data * atxp1_update_device(struct device *dev);
static int atxp1_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info);
static int atxp1_detect(struct i2c_client *client, struct i2c_board_info *info);

static const struct i2c_device_id atxp1_id[] = {
{ "atxp1", atxp1 },
Expand Down Expand Up @@ -275,7 +274,7 @@ static const struct attribute_group atxp1_group = {


/* Return 0 if detection is successful, -ENODEV otherwise */
static int atxp1_detect(struct i2c_client *new_client, int kind,
static int atxp1_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = new_client->adapter;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/dme1737.c
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@ static int dme1737_i2c_get_features(int sio_cip, struct dme1737_data *data)
}

/* Return 0 if detection is successful, -ENODEV otherwise */
static int dme1737_i2c_detect(struct i2c_client *client, int kind,
static int dme1737_i2c_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/ds1621.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static const struct attribute_group ds1621_group = {


/* Return 0 if detection is successful, -ENODEV otherwise */
static int ds1621_detect(struct i2c_client *client, int kind,
static int ds1621_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/f75375s.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct f75375_data {
s8 temp_max_hyst[2];
};

static int f75375_detect(struct i2c_client *client, int kind,
static int f75375_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int f75375_probe(struct i2c_client *client,
const struct i2c_device_id *id);
Expand Down Expand Up @@ -677,7 +677,7 @@ static int f75375_remove(struct i2c_client *client)
}

/* Return 0 if detection is successful, -ENODEV otherwise */
static int f75375_detect(struct i2c_client *client, int kind,
static int f75375_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/fschmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static const int FSCHMD_NO_TEMP_SENSORS[7] = { 3, 3, 4, 3, 5, 5, 11 };

static int fschmd_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int fschmd_detect(struct i2c_client *client, int kind,
static int fschmd_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int fschmd_remove(struct i2c_client *client);
static struct fschmd_data *fschmd_update_device(struct device *dev);
Expand Down Expand Up @@ -1000,7 +1000,7 @@ static void fschmd_dmi_decode(const struct dmi_header *header, void *dummy)
}
}

static int fschmd_detect(struct i2c_client *client, int _kind,
static int fschmd_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
enum chips kind;
Expand Down
6 changes: 2 additions & 4 deletions drivers/hwmon/gl518sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ struct gl518_data {

static int gl518_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int gl518_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info);
static int gl518_detect(struct i2c_client *client, struct i2c_board_info *info);
static void gl518_init_client(struct i2c_client *client);
static int gl518_remove(struct i2c_client *client);
static int gl518_read_value(struct i2c_client *client, u8 reg);
Expand Down Expand Up @@ -484,8 +483,7 @@ static const struct attribute_group gl518_group_r80 = {
*/

/* Return 0 if detection is successful, -ENODEV otherwise */
static int gl518_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info)
static int gl518_detect(struct i2c_client *client, struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;
int rev;
Expand Down
6 changes: 2 additions & 4 deletions drivers/hwmon/gl520sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ static const u8 GL520_REG_TEMP_MAX_HYST[] = { 0x06, 0x18 };

static int gl520_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int gl520_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info);
static int gl520_detect(struct i2c_client *client, struct i2c_board_info *info);
static void gl520_init_client(struct i2c_client *client);
static int gl520_remove(struct i2c_client *client);
static int gl520_read_value(struct i2c_client *client, u8 reg);
Expand Down Expand Up @@ -681,8 +680,7 @@ static const struct attribute_group gl520_group_opt = {
*/

/* Return 0 if detection is successful, -ENODEV otherwise */
static int gl520_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info)
static int gl520_detect(struct i2c_client *client, struct i2c_board_info *info)
{
struct i2c_adapter *adapter = client->adapter;

Expand Down
5 changes: 2 additions & 3 deletions drivers/hwmon/lm63.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ static int lm63_remove(struct i2c_client *client);

static struct lm63_data *lm63_update_device(struct device *dev);

static int lm63_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info);
static int lm63_detect(struct i2c_client *client, struct i2c_board_info *info);
static void lm63_init_client(struct i2c_client *client);

/*
Expand Down Expand Up @@ -423,7 +422,7 @@ static const struct attribute_group lm63_group_fan1 = {
*/

/* Return 0 if detection is successful, -ENODEV otherwise */
static int lm63_detect(struct i2c_client *new_client, int kind,
static int lm63_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = new_client->adapter;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/lm73.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static const struct i2c_device_id lm73_ids[] = {
MODULE_DEVICE_TABLE(i2c, lm73_ids);

/* Return 0 if detection is successful, -ENODEV otherwise */
static int lm73_detect(struct i2c_client *new_client, int kind,
static int lm73_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = new_client->adapter;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static const struct i2c_device_id lm75_ids[] = {
MODULE_DEVICE_TABLE(i2c, lm75_ids);

/* Return 0 if detection is successful, -ENODEV otherwise */
static int lm75_detect(struct i2c_client *new_client, int kind,
static int lm75_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = new_client->adapter;
Expand Down
5 changes: 2 additions & 3 deletions drivers/hwmon/lm77.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ struct lm77_data {

static int lm77_probe(struct i2c_client *client,
const struct i2c_device_id *id);
static int lm77_detect(struct i2c_client *client, int kind,
struct i2c_board_info *info);
static int lm77_detect(struct i2c_client *client, struct i2c_board_info *info);
static void lm77_init_client(struct i2c_client *client);
static int lm77_remove(struct i2c_client *client);
static u16 lm77_read_value(struct i2c_client *client, u8 reg);
Expand Down Expand Up @@ -245,7 +244,7 @@ static const struct attribute_group lm77_group = {
};

/* Return 0 if detection is successful, -ENODEV otherwise */
static int lm77_detect(struct i2c_client *new_client, int kind,
static int lm77_detect(struct i2c_client *new_client,
struct i2c_board_info *info)
{
struct i2c_adapter *adapter = new_client->adapter;
Expand Down
4 changes: 2 additions & 2 deletions drivers/hwmon/lm78.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct lm78_data {
};


static int lm78_i2c_detect(struct i2c_client *client, int kind,
static int lm78_i2c_detect(struct i2c_client *client,
struct i2c_board_info *info);
static int lm78_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id);
Expand Down Expand Up @@ -558,7 +558,7 @@ static int lm78_alias_detect(struct i2c_client *client, u8 chipid)
return 1;
}

static int lm78_i2c_detect(struct i2c_client *client, int kind,
static int lm78_i2c_detect(struct i2c_client *client,
struct i2c_board_info *info)
{
int i;
Expand Down
Loading

0 comments on commit 310ec79

Please sign in to comment.