Skip to content

Commit 1f86df4

Browse files
author
Jean Delvare
committed
i2c: Drop I2C_CLIENT_INSMOD_1
This macro simply declares an enum, so drivers might as well declare it themselves. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
1 parent c3813d6 commit 1f86df4

30 files changed

+30
-121
lines changed

drivers/hwmon/adm1026.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
/* Addresses to scan */
3838
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
3939

40-
/* Insmod parameters */
41-
I2C_CLIENT_INSMOD_1(adm1026);
42-
4340
static int gpio_input[17] = { -1, -1, -1, -1, -1, -1, -1, -1, -1,
4441
-1, -1, -1, -1, -1, -1, -1, -1 };
4542
static int gpio_output[17] = { -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -305,7 +302,7 @@ static void adm1026_init_client(struct i2c_client *client);
305302

306303

307304
static const struct i2c_device_id adm1026_id[] = {
308-
{ "adm1026", adm1026 },
305+
{ "adm1026", 0 },
309306
{ }
310307
};
311308
MODULE_DEVICE_TABLE(i2c, adm1026_id);

drivers/hwmon/adm1029.c

+1-7
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,6 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
4343
0x2e, 0x2f, I2C_CLIENT_END
4444
};
4545

46-
/*
47-
* Insmod parameters
48-
*/
49-
50-
I2C_CLIENT_INSMOD_1(adm1029);
51-
5246
/*
5347
* The ADM1029 registers
5448
* Manufacturer ID is 0x41 for Analog Devices
@@ -128,7 +122,7 @@ static int adm1029_init_client(struct i2c_client *client);
128122
*/
129123

130124
static const struct i2c_device_id adm1029_id[] = {
131-
{ "adm1029", adm1029 },
125+
{ "adm1029", 0 },
132126
{ }
133127
};
134128
MODULE_DEVICE_TABLE(i2c, adm1029_id);

drivers/hwmon/ads7828.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@
4747
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
4848
I2C_CLIENT_END };
4949

50-
/* Insmod parameters */
51-
I2C_CLIENT_INSMOD_1(ads7828);
52-
53-
/* Other module parameters */
50+
/* Module parameters */
5451
static int se_input = 1; /* Default is SE, 0 == diff */
5552
static int int_vref = 1; /* Default is internal ref ON */
5653
static int vref_mv = ADS7828_INT_VREF_MV; /* set if vref != 2.5V */
@@ -168,7 +165,7 @@ static int ads7828_remove(struct i2c_client *client)
168165
}
169166

170167
static const struct i2c_device_id ads7828_id[] = {
171-
{ "ads7828", ads7828 },
168+
{ "ads7828", 0 },
172169
{ }
173170
};
174171
MODULE_DEVICE_TABLE(i2c, ads7828_id);

drivers/hwmon/adt7462.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
/* Addresses to scan */
3333
static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END };
3434

35-
/* Insmod parameters */
36-
I2C_CLIENT_INSMOD_1(adt7462);
37-
3835
/* ADT7462 registers */
3936
#define ADT7462_REG_DEVICE 0x3D
4037
#define ADT7462_REG_VENDOR 0x3E
@@ -242,7 +239,7 @@ static int adt7462_detect(struct i2c_client *client,
242239
static int adt7462_remove(struct i2c_client *client);
243240

244241
static const struct i2c_device_id adt7462_id[] = {
245-
{ "adt7462", adt7462 },
242+
{ "adt7462", 0 },
246243
{ }
247244
};
248245
MODULE_DEVICE_TABLE(i2c, adt7462_id);

drivers/hwmon/adt7470.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
/* Addresses to scan */
3434
static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };
3535

36-
/* Insmod parameters */
37-
I2C_CLIENT_INSMOD_1(adt7470);
38-
3936
/* ADT7470 registers */
4037
#define ADT7470_REG_BASE_ADDR 0x20
4138
#define ADT7470_REG_TEMP_BASE_ADDR 0x20
@@ -182,7 +179,7 @@ static int adt7470_detect(struct i2c_client *client,
182179
static int adt7470_remove(struct i2c_client *client);
183180

184181
static const struct i2c_device_id adt7470_id[] = {
185-
{ "adt7470", adt7470 },
182+
{ "adt7470", 0 },
186183
{ }
187184
};
188185
MODULE_DEVICE_TABLE(i2c, adt7470_id);

drivers/hwmon/adt7473.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
/* Addresses to scan */
3333
static const unsigned short normal_i2c[] = { 0x2C, 0x2D, 0x2E, I2C_CLIENT_END };
3434

35-
/* Insmod parameters */
36-
I2C_CLIENT_INSMOD_1(adt7473);
37-
3835
/* ADT7473 registers */
3936
#define ADT7473_REG_BASE_ADDR 0x20
4037

@@ -171,7 +168,7 @@ static int adt7473_detect(struct i2c_client *client,
171168
static int adt7473_remove(struct i2c_client *client);
172169

173170
static const struct i2c_device_id adt7473_id[] = {
174-
{ "adt7473", adt7473 },
171+
{ "adt7473", 0 },
175172
{ }
176173
};
177174

drivers/hwmon/asb100.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
/* I2C addresses to scan */
5252
static const unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
5353

54-
/* Insmod parameters */
55-
I2C_CLIENT_INSMOD_1(asb100);
56-
5754
static unsigned short force_subclients[4];
5855
module_param_array(force_subclients, short, NULL, 0);
5956
MODULE_PARM_DESC(force_subclients, "List of subclient addresses: "
@@ -216,7 +213,7 @@ static struct asb100_data *asb100_update_device(struct device *dev);
216213
static void asb100_init_client(struct i2c_client *client);
217214

218215
static const struct i2c_device_id asb100_id[] = {
219-
{ "asb100", asb100 },
216+
{ "asb100", 0 },
220217
{ }
221218
};
222219
MODULE_DEVICE_TABLE(i2c, asb100_id);

drivers/hwmon/atxp1.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,14 @@ MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>");
4444

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

47-
I2C_CLIENT_INSMOD_1(atxp1);
48-
4947
static int atxp1_probe(struct i2c_client *client,
5048
const struct i2c_device_id *id);
5149
static int atxp1_remove(struct i2c_client *client);
5250
static struct atxp1_data * atxp1_update_device(struct device *dev);
5351
static int atxp1_detect(struct i2c_client *client, struct i2c_board_info *info);
5452

5553
static const struct i2c_device_id atxp1_id[] = {
56-
{ "atxp1", atxp1 },
54+
{ "atxp1", 0 },
5755
{ }
5856
};
5957
MODULE_DEVICE_TABLE(i2c, atxp1_id);

drivers/hwmon/ds1621.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
3838
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
3939

4040
/* Insmod parameters */
41-
I2C_CLIENT_INSMOD_1(ds1621);
4241
static int polarity = -1;
4342
module_param(polarity, int, 0);
4443
MODULE_PARM_DESC(polarity, "Output's polarity: 0 = active high, 1 = active low");
@@ -305,8 +304,8 @@ static int ds1621_remove(struct i2c_client *client)
305304
}
306305

307306
static const struct i2c_device_id ds1621_id[] = {
308-
{ "ds1621", ds1621 },
309-
{ "ds1625", ds1621 },
307+
{ "ds1621", 0 },
308+
{ "ds1625", 0 },
310309
{ }
311310
};
312311
MODULE_DEVICE_TABLE(i2c, ds1621_id);

drivers/hwmon/gl520sm.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ MODULE_PARM_DESC(extra_sensor_type, "Type of extra sensor (0=autodetect, 1=tempe
4141
/* Addresses to scan */
4242
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
4343

44-
/* Insmod parameters */
45-
I2C_CLIENT_INSMOD_1(gl520sm);
46-
4744
/* Many GL520 constants specified below
4845
One of the inputs can be configured as either temp or voltage.
4946
That's why _TEMP2 and _IN4 access the same register
@@ -90,7 +87,7 @@ static struct gl520_data *gl520_update_device(struct device *dev);
9087

9188
/* Driver data */
9289
static const struct i2c_device_id gl520_id[] = {
93-
{ "gl520sm", gl520sm },
90+
{ "gl520sm", 0 },
9491
{ }
9592
};
9693
MODULE_DEVICE_TABLE(i2c, gl520_id);

drivers/hwmon/lm63.c

+1-7
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@
5555

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

58-
/*
59-
* Insmod parameters
60-
*/
61-
62-
I2C_CLIENT_INSMOD_1(lm63);
63-
6458
/*
6559
* The LM63 registers
6660
*/
@@ -142,7 +136,7 @@ static void lm63_init_client(struct i2c_client *client);
142136
*/
143137

144138
static const struct i2c_device_id lm63_id[] = {
145-
{ "lm63", lm63 },
139+
{ "lm63", 0 },
146140
{ }
147141
};
148142
MODULE_DEVICE_TABLE(i2c, lm63_id);

drivers/hwmon/lm73.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4c,
2828
0x4d, 0x4e, I2C_CLIENT_END };
2929

30-
/* Insmod parameters */
31-
I2C_CLIENT_INSMOD_1(lm73);
32-
3330
/* LM73 registers */
3431
#define LM73_REG_INPUT 0x00
3532
#define LM73_REG_CONF 0x01
@@ -145,7 +142,7 @@ static int lm73_remove(struct i2c_client *client)
145142
}
146143

147144
static const struct i2c_device_id lm73_ids[] = {
148-
{ "lm73", lm73 },
145+
{ "lm73", 0 },
149146
{ /* LIST END */ }
150147
};
151148
MODULE_DEVICE_TABLE(i2c, lm73_ids);

drivers/hwmon/lm75.c

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,12 @@
3232

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

4037
enum lm75_type { /* keep sorted in alphabetical order */
41-
ds1775 = 9,
38+
ds1775,
4239
ds75,
43-
/* lm75 -- in I2C_CLIENT_INSMOD_1() */
40+
lm75,
4441
lm75a,
4542
max6625,
4643
max6626,
@@ -58,9 +55,6 @@ enum lm75_type { /* keep sorted in alphabetical order */
5855
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
5956
0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
6057

61-
/* Insmod parameters */
62-
I2C_CLIENT_INSMOD_1(lm75);
63-
6458

6559
/* The LM75 registers */
6660
#define LM75_REG_CONF 0x01

drivers/hwmon/lm77.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
4040
I2C_CLIENT_END };
4141

42-
/* Insmod parameters */
43-
I2C_CLIENT_INSMOD_1(lm77);
44-
4542
/* The LM77 registers */
4643
#define LM77_REG_TEMP 0x00
4744
#define LM77_REG_CONF 0x01
@@ -76,7 +73,7 @@ static struct lm77_data *lm77_update_device(struct device *dev);
7673

7774

7875
static const struct i2c_device_id lm77_id[] = {
79-
{ "lm77", lm77 },
76+
{ "lm77", 0 },
8077
{ }
8178
};
8279
MODULE_DEVICE_TABLE(i2c, lm77_id);

drivers/hwmon/lm80.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@
3535
static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
3636
0x2e, 0x2f, I2C_CLIENT_END };
3737

38-
/* Insmod parameters */
39-
I2C_CLIENT_INSMOD_1(lm80);
40-
4138
/* Many LM80 constants specified below */
4239

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

147144
static const struct i2c_device_id lm80_id[] = {
148-
{ "lm80", lm80 },
145+
{ "lm80", 0 },
149146
{ }
150147
};
151148
MODULE_DEVICE_TABLE(i2c, lm80_id);

drivers/hwmon/lm92.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@
5454
static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
5555
I2C_CLIENT_END };
5656

57-
/* Insmod parameters */
58-
I2C_CLIENT_INSMOD_1(lm92);
59-
6057
/* The LM92 registers */
6158
#define LM92_REG_CONFIG 0x01 /* 8-bit, RW */
6259
#define LM92_REG_TEMP 0x00 /* 16-bit, RO */
@@ -401,7 +398,7 @@ static int lm92_remove(struct i2c_client *client)
401398
*/
402399

403400
static const struct i2c_device_id lm92_id[] = {
404-
{ "lm92", lm92 },
401+
{ "lm92", 0 },
405402
/* max6635 could be added here */
406403
{ }
407404
};

drivers/hwmon/lm93.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@
145145
static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
146146

147147
/* Insmod parameters */
148-
I2C_CLIENT_INSMOD_1(lm93);
149148

150149
static int disable_block;
151150
module_param(disable_block, bool, 0);
@@ -2602,7 +2601,7 @@ static int lm93_remove(struct i2c_client *client)
26022601
}
26032602

26042603
static const struct i2c_device_id lm93_id[] = {
2605-
{ "lm93", lm93 },
2604+
{ "lm93", 0 },
26062605
{ }
26072606
};
26082607
MODULE_DEVICE_TABLE(i2c, lm93_id);

drivers/hwmon/lm95241.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
static const unsigned short normal_i2c[] = {
4040
0x19, 0x2a, 0x2b, I2C_CLIENT_END};
4141

42-
/* Insmod parameters */
43-
I2C_CLIENT_INSMOD_1(lm95241);
44-
4542
/* LM95241 registers */
4643
#define LM95241_REG_R_MAN_ID 0xFE
4744
#define LM95241_REG_R_CHIP_ID 0xFF
@@ -446,7 +443,7 @@ static struct lm95241_data *lm95241_update_device(struct device *dev)
446443

447444
/* Driver data (common to all clients) */
448445
static const struct i2c_device_id lm95241_id[] = {
449-
{ "lm95241", lm95241 },
446+
{ "lm95241", 0 },
450447
{ }
451448
};
452449
MODULE_DEVICE_TABLE(i2c, lm95241_id);

drivers/hwmon/max1619.c

+1-7
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@
4040
static const unsigned short normal_i2c[] = {
4141
0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END };
4242

43-
/*
44-
* Insmod parameters
45-
*/
46-
47-
I2C_CLIENT_INSMOD_1(max1619);
48-
4943
/*
5044
* The MAX1619 registers
5145
*/
@@ -99,7 +93,7 @@ static struct max1619_data *max1619_update_device(struct device *dev);
9993
*/
10094

10195
static const struct i2c_device_id max1619_id[] = {
102-
{ "max1619", max1619 },
96+
{ "max1619", 0 },
10397
{ }
10498
};
10599
MODULE_DEVICE_TABLE(i2c, max1619_id);

drivers/hwmon/max6650.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ module_param(fan_voltage, int, S_IRUGO);
6262
module_param(prescaler, int, S_IRUGO);
6363
module_param(clock, int, S_IRUGO);
6464

65-
I2C_CLIENT_INSMOD_1(max6650);
66-
6765
/*
6866
* MAX 6650/6651 registers
6967
*/
@@ -127,7 +125,7 @@ static struct max6650_data *max6650_update_device(struct device *dev);
127125
*/
128126

129127
static const struct i2c_device_id max6650_id[] = {
130-
{ "max6650", max6650 },
128+
{ "max6650", 0 },
131129
{ }
132130
};
133131
MODULE_DEVICE_TABLE(i2c, max6650_id);

0 commit comments

Comments
 (0)