Skip to content

Commit

Permalink
i2c: Drop I2C_CLIENT_INSMOD_1
Browse files Browse the repository at this point in the history
This macro simply declares an enum, so drivers might as well declare
it themselves.

Signed-off-by: Jean Delvare <[email protected]>
Tested-by: Wolfram Sang <[email protected]>
  • Loading branch information
Jean Delvare committed Dec 14, 2009
1 parent c3813d6 commit 1f86df4
Show file tree
Hide file tree
Showing 30 changed files with 30 additions and 121 deletions.
5 changes: 1 addition & 4 deletions drivers/hwmon/adm1026.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
/* Addresses to scan */
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(adm1026);

static int gpio_input[17] = { -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1 };
static int gpio_output[17] = { -1, -1, -1, -1, -1, -1, -1, -1, -1,
Expand Down Expand Up @@ -305,7 +302,7 @@ static void adm1026_init_client(struct i2c_client *client);


static const struct i2c_device_id adm1026_id[] = {
{ "adm1026", adm1026 },
{ "adm1026", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, adm1026_id);
Expand Down
8 changes: 1 addition & 7 deletions drivers/hwmon/adm1029.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
0x2e, 0x2f, I2C_CLIENT_END
};

/*
* Insmod parameters
*/

I2C_CLIENT_INSMOD_1(adm1029);

/*
* The ADM1029 registers
* Manufacturer ID is 0x41 for Analog Devices
Expand Down Expand Up @@ -128,7 +122,7 @@ static int adm1029_init_client(struct i2c_client *client);
*/

static const struct i2c_device_id adm1029_id[] = {
{ "adm1029", adm1029 },
{ "adm1029", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, adm1029_id);
Expand Down
7 changes: 2 additions & 5 deletions drivers/hwmon/ads7828.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(ads7828);

/* Other module parameters */
/* Module parameters */
static int se_input = 1; /* Default is SE, 0 == diff */
static int int_vref = 1; /* Default is internal ref ON */
static int vref_mv = ADS7828_INT_VREF_MV; /* set if vref != 2.5V */
Expand Down Expand Up @@ -168,7 +165,7 @@ static int ads7828_remove(struct i2c_client *client)
}

static const struct i2c_device_id ads7828_id[] = {
{ "ads7828", ads7828 },
{ "ads7828", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, ads7828_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/adt7462.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
/* Addresses to scan */
static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(adt7462);

/* ADT7462 registers */
#define ADT7462_REG_DEVICE 0x3D
#define ADT7462_REG_VENDOR 0x3E
Expand Down Expand Up @@ -242,7 +239,7 @@ static int adt7462_detect(struct i2c_client *client,
static int adt7462_remove(struct i2c_client *client);

static const struct i2c_device_id adt7462_id[] = {
{ "adt7462", adt7462 },
{ "adt7462", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, adt7462_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/adt7470.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
/* Addresses to scan */
static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(adt7470);

/* ADT7470 registers */
#define ADT7470_REG_BASE_ADDR 0x20
#define ADT7470_REG_TEMP_BASE_ADDR 0x20
Expand Down Expand Up @@ -182,7 +179,7 @@ static int adt7470_detect(struct i2c_client *client,
static int adt7470_remove(struct i2c_client *client);

static const struct i2c_device_id adt7470_id[] = {
{ "adt7470", adt7470 },
{ "adt7470", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, adt7470_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/adt7473.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
/* Addresses to scan */
static const unsigned short normal_i2c[] = { 0x2C, 0x2D, 0x2E, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(adt7473);

/* ADT7473 registers */
#define ADT7473_REG_BASE_ADDR 0x20

Expand Down Expand Up @@ -171,7 +168,7 @@ static int adt7473_detect(struct i2c_client *client,
static int adt7473_remove(struct i2c_client *client);

static const struct i2c_device_id adt7473_id[] = {
{ "adt7473", adt7473 },
{ "adt7473", 0 },
{ }
};

Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/asb100.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@
/* I2C addresses to scan */
static const unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(asb100);

static unsigned short force_subclients[4];
module_param_array(force_subclients, short, NULL, 0);
MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
Expand Down Expand Up @@ -216,7 +213,7 @@ static struct asb100_data *asb100_update_device(struct device *dev);
static void asb100_init_client(struct i2c_client *client);

static const struct i2c_device_id asb100_id[] = {
{ "asb100", asb100 },
{ "asb100", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, asb100_id);
Expand Down
4 changes: 1 addition & 3 deletions drivers/hwmon/atxp1.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,14 @@ MODULE_AUTHOR("Sebastian Witt <[email protected]>");

static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END };

I2C_CLIENT_INSMOD_1(atxp1);

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, struct i2c_board_info *info);

static const struct i2c_device_id atxp1_id[] = {
{ "atxp1", atxp1 },
{ "atxp1", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, atxp1_id);
Expand Down
5 changes: 2 additions & 3 deletions drivers/hwmon/ds1621.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(ds1621);
static int polarity = -1;
module_param(polarity, int, 0);
MODULE_PARM_DESC(polarity, "Output's polarity: 0 = active high, 1 = active low");
Expand Down Expand Up @@ -305,8 +304,8 @@ static int ds1621_remove(struct i2c_client *client)
}

static const struct i2c_device_id ds1621_id[] = {
{ "ds1621", ds1621 },
{ "ds1625", ds1621 },
{ "ds1621", 0 },
{ "ds1625", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, ds1621_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/gl520sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ MODULE_PARM_DESC(extra_sensor_type, "Type of extra sensor (0=autodetect, 1=tempe
/* Addresses to scan */
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(gl520sm);

/* Many GL520 constants specified below
One of the inputs can be configured as either temp or voltage.
That's why _TEMP2 and _IN4 access the same register
Expand Down Expand Up @@ -90,7 +87,7 @@ static struct gl520_data *gl520_update_device(struct device *dev);

/* Driver data */
static const struct i2c_device_id gl520_id[] = {
{ "gl520sm", gl520sm },
{ "gl520sm", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, gl520_id);
Expand Down
8 changes: 1 addition & 7 deletions drivers/hwmon/lm63.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@

static const unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END };

/*
* Insmod parameters
*/

I2C_CLIENT_INSMOD_1(lm63);

/*
* The LM63 registers
*/
Expand Down Expand Up @@ -142,7 +136,7 @@ static void lm63_init_client(struct i2c_client *client);
*/

static const struct i2c_device_id lm63_id[] = {
{ "lm63", lm63 },
{ "lm63", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, lm63_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/lm73.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4c,
0x4d, 0x4e, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm73);

/* LM73 registers */
#define LM73_REG_INPUT 0x00
#define LM73_REG_CONF 0x01
Expand Down Expand Up @@ -145,7 +142,7 @@ static int lm73_remove(struct i2c_client *client)
}

static const struct i2c_device_id lm73_ids[] = {
{ "lm73", lm73 },
{ "lm73", 0 },
{ /* LIST END */ }
};
MODULE_DEVICE_TABLE(i2c, lm73_ids);
Expand Down
10 changes: 2 additions & 8 deletions drivers/hwmon/lm75.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,12 @@

/*
* This driver handles the LM75 and compatible digital temperature sensors.
* Only types which are _not_ listed in I2C_CLIENT_INSMOD_*() need to be
* listed here. We start at 9 since I2C_CLIENT_INSMOD_*() currently allow
* definition of up to 8 chip types (plus zero).
*/

enum lm75_type { /* keep sorted in alphabetical order */
ds1775 = 9,
ds1775,
ds75,
/* lm75 -- in I2C_CLIENT_INSMOD_1() */
lm75,
lm75a,
max6625,
max6626,
Expand All @@ -58,9 +55,6 @@ enum lm75_type { /* keep sorted in alphabetical order */
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm75);


/* The LM75 registers */
#define LM75_REG_CONF 0x01
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/lm77.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm77);

/* The LM77 registers */
#define LM77_REG_TEMP 0x00
#define LM77_REG_CONF 0x01
Expand Down Expand Up @@ -76,7 +73,7 @@ static struct lm77_data *lm77_update_device(struct device *dev);


static const struct i2c_device_id lm77_id[] = {
{ "lm77", lm77 },
{ "lm77", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, lm77_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/lm80.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
0x2e, 0x2f, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm80);

/* Many LM80 constants specified below */

/* The LM80 registers */
Expand Down Expand Up @@ -145,7 +142,7 @@ static int lm80_write_value(struct i2c_client *client, u8 reg, u8 value);
*/

static const struct i2c_device_id lm80_id[] = {
{ "lm80", lm80 },
{ "lm80", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, lm80_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/lm92.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm92);

/* The LM92 registers */
#define LM92_REG_CONFIG 0x01 /* 8-bit, RW */
#define LM92_REG_TEMP 0x00 /* 16-bit, RO */
Expand Down Expand Up @@ -401,7 +398,7 @@ static int lm92_remove(struct i2c_client *client)
*/

static const struct i2c_device_id lm92_id[] = {
{ "lm92", lm92 },
{ "lm92", 0 },
/* max6635 could be added here */
{ }
};
Expand Down
3 changes: 1 addition & 2 deletions drivers/hwmon/lm93.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm93);

static int disable_block;
module_param(disable_block, bool, 0);
Expand Down Expand Up @@ -2602,7 +2601,7 @@ static int lm93_remove(struct i2c_client *client)
}

static const struct i2c_device_id lm93_id[] = {
{ "lm93", lm93 },
{ "lm93", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, lm93_id);
Expand Down
5 changes: 1 addition & 4 deletions drivers/hwmon/lm95241.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
static const unsigned short normal_i2c[] = {
0x19, 0x2a, 0x2b, I2C_CLIENT_END};

/* Insmod parameters */
I2C_CLIENT_INSMOD_1(lm95241);

/* LM95241 registers */
#define LM95241_REG_R_MAN_ID 0xFE
#define LM95241_REG_R_CHIP_ID 0xFF
Expand Down Expand Up @@ -446,7 +443,7 @@ static struct lm95241_data *lm95241_update_device(struct device *dev)

/* Driver data (common to all clients) */
static const struct i2c_device_id lm95241_id[] = {
{ "lm95241", lm95241 },
{ "lm95241", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, lm95241_id);
Expand Down
8 changes: 1 addition & 7 deletions drivers/hwmon/max1619.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
static const unsigned short normal_i2c[] = {
0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };

/*
* Insmod parameters
*/

I2C_CLIENT_INSMOD_1(max1619);

/*
* The MAX1619 registers
*/
Expand Down Expand Up @@ -99,7 +93,7 @@ static struct max1619_data *max1619_update_device(struct device *dev);
*/

static const struct i2c_device_id max1619_id[] = {
{ "max1619", max1619 },
{ "max1619", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, max1619_id);
Expand Down
4 changes: 1 addition & 3 deletions drivers/hwmon/max6650.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ module_param(fan_voltage, int, S_IRUGO);
module_param(prescaler, int, S_IRUGO);
module_param(clock, int, S_IRUGO);

I2C_CLIENT_INSMOD_1(max6650);

/*
* MAX 6650/6651 registers
*/
Expand Down Expand Up @@ -127,7 +125,7 @@ static struct max6650_data *max6650_update_device(struct device *dev);
*/

static const struct i2c_device_id max6650_id[] = {
{ "max6650", max6650 },
{ "max6650", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, max6650_id);
Expand Down
Loading

0 comments on commit 1f86df4

Please sign in to comment.