Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+30 -121
+1 -4
drivers/hwmon/adm1026.c
··· 37 37 /* Addresses to scan */ 38 38 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 39 39 40 - /* Insmod parameters */ 41 - I2C_CLIENT_INSMOD_1(adm1026); 42 - 43 40 static int gpio_input[17] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, 44 41 -1, -1, -1, -1, -1, -1, -1, -1 }; 45 42 static int gpio_output[17] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, ··· 302 305 303 306 304 307 static const struct i2c_device_id adm1026_id[] = { 305 - { "adm1026", adm1026 }, 308 + { "adm1026", 0 }, 306 309 { } 307 310 }; 308 311 MODULE_DEVICE_TABLE(i2c, adm1026_id);
+1 -7
drivers/hwmon/adm1029.c
··· 44 44 }; 45 45 46 46 /* 47 - * Insmod parameters 48 - */ 49 - 50 - I2C_CLIENT_INSMOD_1(adm1029); 51 - 52 - /* 53 47 * The ADM1029 registers 54 48 * Manufacturer ID is 0x41 for Analog Devices 55 49 */ ··· 122 128 */ 123 129 124 130 static const struct i2c_device_id adm1029_id[] = { 125 - { "adm1029", adm1029 }, 131 + { "adm1029", 0 }, 126 132 { } 127 133 }; 128 134 MODULE_DEVICE_TABLE(i2c, adm1029_id);
+2 -5
drivers/hwmon/ads7828.c
··· 47 47 static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 48 48 I2C_CLIENT_END }; 49 49 50 - /* Insmod parameters */ 51 - I2C_CLIENT_INSMOD_1(ads7828); 52 - 53 - /* Other module parameters */ 50 + /* Module parameters */ 54 51 static int se_input = 1; /* Default is SE, 0 == diff */ 55 52 static int int_vref = 1; /* Default is internal ref ON */ 56 53 static int vref_mv = ADS7828_INT_VREF_MV; /* set if vref != 2.5V */ ··· 165 168 } 166 169 167 170 static const struct i2c_device_id ads7828_id[] = { 168 - { "ads7828", ads7828 }, 171 + { "ads7828", 0 }, 169 172 { } 170 173 }; 171 174 MODULE_DEVICE_TABLE(i2c, ads7828_id);
+1 -4
drivers/hwmon/adt7462.c
··· 32 32 /* Addresses to scan */ 33 33 static const unsigned short normal_i2c[] = { 0x58, 0x5C, I2C_CLIENT_END }; 34 34 35 - /* Insmod parameters */ 36 - I2C_CLIENT_INSMOD_1(adt7462); 37 - 38 35 /* ADT7462 registers */ 39 36 #define ADT7462_REG_DEVICE 0x3D 40 37 #define ADT7462_REG_VENDOR 0x3E ··· 239 242 static int adt7462_remove(struct i2c_client *client); 240 243 241 244 static const struct i2c_device_id adt7462_id[] = { 242 - { "adt7462", adt7462 }, 245 + { "adt7462", 0 }, 243 246 { } 244 247 }; 245 248 MODULE_DEVICE_TABLE(i2c, adt7462_id);
+1 -4
drivers/hwmon/adt7470.c
··· 33 33 /* Addresses to scan */ 34 34 static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END }; 35 35 36 - /* Insmod parameters */ 37 - I2C_CLIENT_INSMOD_1(adt7470); 38 - 39 36 /* ADT7470 registers */ 40 37 #define ADT7470_REG_BASE_ADDR 0x20 41 38 #define ADT7470_REG_TEMP_BASE_ADDR 0x20 ··· 179 182 static int adt7470_remove(struct i2c_client *client); 180 183 181 184 static const struct i2c_device_id adt7470_id[] = { 182 - { "adt7470", adt7470 }, 185 + { "adt7470", 0 }, 183 186 { } 184 187 }; 185 188 MODULE_DEVICE_TABLE(i2c, adt7470_id);
+1 -4
drivers/hwmon/adt7473.c
··· 32 32 /* Addresses to scan */ 33 33 static const unsigned short normal_i2c[] = { 0x2C, 0x2D, 0x2E, I2C_CLIENT_END }; 34 34 35 - /* Insmod parameters */ 36 - I2C_CLIENT_INSMOD_1(adt7473); 37 - 38 35 /* ADT7473 registers */ 39 36 #define ADT7473_REG_BASE_ADDR 0x20 40 37 ··· 168 171 static int adt7473_remove(struct i2c_client *client); 169 172 170 173 static const struct i2c_device_id adt7473_id[] = { 171 - { "adt7473", adt7473 }, 174 + { "adt7473", 0 }, 172 175 { } 173 176 }; 174 177
+1 -4
drivers/hwmon/asb100.c
··· 51 51 /* I2C addresses to scan */ 52 52 static const unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END }; 53 53 54 - /* Insmod parameters */ 55 - I2C_CLIENT_INSMOD_1(asb100); 56 - 57 54 static unsigned short force_subclients[4]; 58 55 module_param_array(force_subclients, short, NULL, 0); 59 56 MODULE_PARM_DESC(force_subclients, "List of subclient addresses: " ··· 213 216 static void asb100_init_client(struct i2c_client *client); 214 217 215 218 static const struct i2c_device_id asb100_id[] = { 216 - { "asb100", asb100 }, 219 + { "asb100", 0 }, 217 220 { } 218 221 }; 219 222 MODULE_DEVICE_TABLE(i2c, asb100_id);
+1 -3
drivers/hwmon/atxp1.c
··· 44 44 45 45 static const unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END }; 46 46 47 - I2C_CLIENT_INSMOD_1(atxp1); 48 - 49 47 static int atxp1_probe(struct i2c_client *client, 50 48 const struct i2c_device_id *id); 51 49 static int atxp1_remove(struct i2c_client *client); ··· 51 53 static int atxp1_detect(struct i2c_client *client, struct i2c_board_info *info); 52 54 53 55 static const struct i2c_device_id atxp1_id[] = { 54 - { "atxp1", atxp1 }, 56 + { "atxp1", 0 }, 55 57 { } 56 58 }; 57 59 MODULE_DEVICE_TABLE(i2c, atxp1_id);
+2 -3
drivers/hwmon/ds1621.c
··· 38 38 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 39 39 40 40 /* Insmod parameters */ 41 - I2C_CLIENT_INSMOD_1(ds1621); 42 41 static int polarity = -1; 43 42 module_param(polarity, int, 0); 44 43 MODULE_PARM_DESC(polarity, "Output's polarity: 0 = active high, 1 = active low"); ··· 304 305 } 305 306 306 307 static const struct i2c_device_id ds1621_id[] = { 307 - { "ds1621", ds1621 }, 308 - { "ds1625", ds1621 }, 308 + { "ds1621", 0 }, 309 + { "ds1625", 0 }, 309 310 { } 310 311 }; 311 312 MODULE_DEVICE_TABLE(i2c, ds1621_id);
+1 -4
drivers/hwmon/gl520sm.c
··· 41 41 /* Addresses to scan */ 42 42 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 43 43 44 - /* Insmod parameters */ 45 - I2C_CLIENT_INSMOD_1(gl520sm); 46 - 47 44 /* Many GL520 constants specified below 48 45 One of the inputs can be configured as either temp or voltage. 49 46 That's why _TEMP2 and _IN4 access the same register ··· 87 90 88 91 /* Driver data */ 89 92 static const struct i2c_device_id gl520_id[] = { 90 - { "gl520sm", gl520sm }, 93 + { "gl520sm", 0 }, 91 94 { } 92 95 }; 93 96 MODULE_DEVICE_TABLE(i2c, gl520_id);
+1 -7
drivers/hwmon/lm63.c
··· 56 56 static const unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END }; 57 57 58 58 /* 59 - * Insmod parameters 60 - */ 61 - 62 - I2C_CLIENT_INSMOD_1(lm63); 63 - 64 - /* 65 59 * The LM63 registers 66 60 */ 67 61 ··· 136 142 */ 137 143 138 144 static const struct i2c_device_id lm63_id[] = { 139 - { "lm63", lm63 }, 145 + { "lm63", 0 }, 140 146 { } 141 147 }; 142 148 MODULE_DEVICE_TABLE(i2c, lm63_id);
+1 -4
drivers/hwmon/lm73.c
··· 27 27 static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4c, 28 28 0x4d, 0x4e, I2C_CLIENT_END }; 29 29 30 - /* Insmod parameters */ 31 - I2C_CLIENT_INSMOD_1(lm73); 32 - 33 30 /* LM73 registers */ 34 31 #define LM73_REG_INPUT 0x00 35 32 #define LM73_REG_CONF 0x01 ··· 142 145 } 143 146 144 147 static const struct i2c_device_id lm73_ids[] = { 145 - { "lm73", lm73 }, 148 + { "lm73", 0 }, 146 149 { /* LIST END */ } 147 150 }; 148 151 MODULE_DEVICE_TABLE(i2c, lm73_ids);
+2 -8
drivers/hwmon/lm75.c
··· 32 32 33 33 /* 34 34 * 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). 38 35 */ 39 36 40 37 enum lm75_type { /* keep sorted in alphabetical order */ 41 - ds1775 = 9, 38 + ds1775, 42 39 ds75, 43 - /* lm75 -- in I2C_CLIENT_INSMOD_1() */ 40 + lm75, 44 41 lm75a, 45 42 max6625, 46 43 max6626, ··· 54 57 /* Addresses scanned */ 55 58 static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, 56 59 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 57 - 58 - /* Insmod parameters */ 59 - I2C_CLIENT_INSMOD_1(lm75); 60 60 61 61 62 62 /* The LM75 registers */
+1 -4
drivers/hwmon/lm77.c
··· 39 39 static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 40 40 I2C_CLIENT_END }; 41 41 42 - /* Insmod parameters */ 43 - I2C_CLIENT_INSMOD_1(lm77); 44 - 45 42 /* The LM77 registers */ 46 43 #define LM77_REG_TEMP 0x00 47 44 #define LM77_REG_CONF 0x01 ··· 73 76 74 77 75 78 static const struct i2c_device_id lm77_id[] = { 76 - { "lm77", lm77 }, 79 + { "lm77", 0 }, 77 80 { } 78 81 }; 79 82 MODULE_DEVICE_TABLE(i2c, lm77_id);
+1 -4
drivers/hwmon/lm80.c
··· 35 35 static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 36 36 0x2e, 0x2f, I2C_CLIENT_END }; 37 37 38 - /* Insmod parameters */ 39 - I2C_CLIENT_INSMOD_1(lm80); 40 - 41 38 /* Many LM80 constants specified below */ 42 39 43 40 /* The LM80 registers */ ··· 142 145 */ 143 146 144 147 static const struct i2c_device_id lm80_id[] = { 145 - { "lm80", lm80 }, 148 + { "lm80", 0 }, 146 149 { } 147 150 }; 148 151 MODULE_DEVICE_TABLE(i2c, lm80_id);
+1 -4
drivers/hwmon/lm92.c
··· 54 54 static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 55 55 I2C_CLIENT_END }; 56 56 57 - /* Insmod parameters */ 58 - I2C_CLIENT_INSMOD_1(lm92); 59 - 60 57 /* The LM92 registers */ 61 58 #define LM92_REG_CONFIG 0x01 /* 8-bit, RW */ 62 59 #define LM92_REG_TEMP 0x00 /* 16-bit, RO */ ··· 398 401 */ 399 402 400 403 static const struct i2c_device_id lm92_id[] = { 401 - { "lm92", lm92 }, 404 + { "lm92", 0 }, 402 405 /* max6635 could be added here */ 403 406 { } 404 407 };
+1 -2
drivers/hwmon/lm93.c
··· 145 145 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 146 146 147 147 /* Insmod parameters */ 148 - I2C_CLIENT_INSMOD_1(lm93); 149 148 150 149 static int disable_block; 151 150 module_param(disable_block, bool, 0); ··· 2601 2602 } 2602 2603 2603 2604 static const struct i2c_device_id lm93_id[] = { 2604 - { "lm93", lm93 }, 2605 + { "lm93", 0 }, 2605 2606 { } 2606 2607 }; 2607 2608 MODULE_DEVICE_TABLE(i2c, lm93_id);
+1 -4
drivers/hwmon/lm95241.c
··· 39 39 static const unsigned short normal_i2c[] = { 40 40 0x19, 0x2a, 0x2b, I2C_CLIENT_END}; 41 41 42 - /* Insmod parameters */ 43 - I2C_CLIENT_INSMOD_1(lm95241); 44 - 45 42 /* LM95241 registers */ 46 43 #define LM95241_REG_R_MAN_ID 0xFE 47 44 #define LM95241_REG_R_CHIP_ID 0xFF ··· 443 446 444 447 /* Driver data (common to all clients) */ 445 448 static const struct i2c_device_id lm95241_id[] = { 446 - { "lm95241", lm95241 }, 449 + { "lm95241", 0 }, 447 450 { } 448 451 }; 449 452 MODULE_DEVICE_TABLE(i2c, lm95241_id);
+1 -7
drivers/hwmon/max1619.c
··· 41 41 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x4c, 0x4d, 0x4e, I2C_CLIENT_END }; 42 42 43 43 /* 44 - * Insmod parameters 45 - */ 46 - 47 - I2C_CLIENT_INSMOD_1(max1619); 48 - 49 - /* 50 44 * The MAX1619 registers 51 45 */ 52 46 ··· 93 99 */ 94 100 95 101 static const struct i2c_device_id max1619_id[] = { 96 - { "max1619", max1619 }, 102 + { "max1619", 0 }, 97 103 { } 98 104 }; 99 105 MODULE_DEVICE_TABLE(i2c, max1619_id);
+1 -3
drivers/hwmon/max6650.c
··· 62 62 module_param(prescaler, int, S_IRUGO); 63 63 module_param(clock, int, S_IRUGO); 64 64 65 - I2C_CLIENT_INSMOD_1(max6650); 66 - 67 65 /* 68 66 * MAX 6650/6651 registers 69 67 */ ··· 125 127 */ 126 128 127 129 static const struct i2c_device_id max6650_id[] = { 128 - { "max6650", max6650 }, 130 + { "max6650", 0 }, 129 131 { } 130 132 }; 131 133 MODULE_DEVICE_TABLE(i2c, max6650_id);
-1
drivers/hwmon/pcf8591.c
··· 29 29 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 30 30 31 31 /* Insmod parameters */ 32 - I2C_CLIENT_INSMOD_1(pcf8591); 33 32 34 33 static int input_mode; 35 34 module_param(input_mode, int, 0);
+1 -4
drivers/hwmon/smsc47m192.c
··· 36 36 /* Addresses to scan */ 37 37 static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 38 38 39 - /* Insmod parameters */ 40 - I2C_CLIENT_INSMOD_1(smsc47m192); 41 - 42 39 /* SMSC47M192 registers */ 43 40 #define SMSC47M192_REG_IN(nr) ((nr)<6 ? (0x20 + (nr)) : \ 44 41 (0x50 + (nr) - 6)) ··· 118 121 static struct smsc47m192_data *smsc47m192_update_device(struct device *dev); 119 122 120 123 static const struct i2c_device_id smsc47m192_id[] = { 121 - { "smsc47m192", smsc47m192 }, 124 + { "smsc47m192", 0 }, 122 125 { } 123 126 }; 124 127 MODULE_DEVICE_TABLE(i2c, smsc47m192_id);
+1 -2
drivers/hwmon/w83791d.c
··· 52 52 I2C_CLIENT_END }; 53 53 54 54 /* Insmod parameters */ 55 - I2C_CLIENT_INSMOD_1(w83791d); 56 55 57 56 static unsigned short force_subclients[4]; 58 57 module_param_array(force_subclients, short, NULL, 0); ··· 340 341 static void w83791d_init_client(struct i2c_client *client); 341 342 342 343 static const struct i2c_device_id w83791d_id[] = { 343 - { "w83791d", w83791d }, 344 + { "w83791d", 0 }, 344 345 { } 345 346 }; 346 347 MODULE_DEVICE_TABLE(i2c, w83791d_id);
+1 -2
drivers/hwmon/w83792d.c
··· 50 50 I2C_CLIENT_END }; 51 51 52 52 /* Insmod parameters */ 53 - I2C_CLIENT_INSMOD_1(w83792d); 54 53 55 54 static unsigned short force_subclients[4]; 56 55 module_param_array(force_subclients, short, NULL, 0); ··· 313 314 static void w83792d_init_client(struct i2c_client *client); 314 315 315 316 static const struct i2c_device_id w83792d_id[] = { 316 - { "w83792d", w83792d }, 317 + { "w83792d", 0 }, 317 318 { } 318 319 }; 319 320 MODULE_DEVICE_TABLE(i2c, w83792d_id);
+1 -2
drivers/hwmon/w83793.c
··· 41 41 I2C_CLIENT_END }; 42 42 43 43 /* Insmod parameters */ 44 - I2C_CLIENT_INSMOD_1(w83793); 45 44 46 45 static unsigned short force_subclients[4]; 47 46 module_param_array(force_subclients, short, NULL, 0); ··· 237 238 static struct w83793_data *w83793_update_device(struct device *dev); 238 239 239 240 static const struct i2c_device_id w83793_id[] = { 240 - { "w83793", w83793 }, 241 + { "w83793", 0 }, 241 242 { } 242 243 }; 243 244 MODULE_DEVICE_TABLE(i2c, w83793_id);
+1 -7
drivers/hwmon/w83l785ts.c
··· 52 52 static const unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END }; 53 53 54 54 /* 55 - * Insmod parameters 56 - */ 57 - 58 - I2C_CLIENT_INSMOD_1(w83l785ts); 59 - 60 - /* 61 55 * The W83L785TS-S registers 62 56 * Manufacturer ID is 0x5CA3 for Winbond. 63 57 */ ··· 88 94 */ 89 95 90 96 static const struct i2c_device_id w83l785ts_id[] = { 91 - { "w83l785ts", w83l785ts }, 97 + { "w83l785ts", 0 }, 92 98 { } 93 99 }; 94 100 MODULE_DEVICE_TABLE(i2c, w83l785ts_id);
+1 -2
drivers/hwmon/w83l786ng.c
··· 38 38 static const unsigned short normal_i2c[] = { 0x2e, 0x2f, I2C_CLIENT_END }; 39 39 40 40 /* Insmod parameters */ 41 - I2C_CLIENT_INSMOD_1(w83l786ng); 42 41 43 42 static int reset; 44 43 module_param(reset, bool, 0); ··· 153 154 static struct w83l786ng_data *w83l786ng_update_device(struct device *dev); 154 155 155 156 static const struct i2c_device_id w83l786ng_id[] = { 156 - { "w83l786ng", w83l786ng }, 157 + { "w83l786ng", 0 }, 157 158 { } 158 159 }; 159 160 MODULE_DEVICE_TABLE(i2c, w83l786ng_id);
-3
drivers/misc/eeprom/eeprom.c
··· 32 32 static const unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, 33 33 0x55, 0x56, 0x57, I2C_CLIENT_END }; 34 34 35 - /* Insmod parameters */ 36 - I2C_CLIENT_INSMOD_1(eeprom); 37 - 38 35 39 36 /* Size of EEPROM in bytes */ 40 37 #define EEPROM_SIZE 256
+1 -4
drivers/misc/ics932s401.c
··· 30 30 /* Addresses to scan */ 31 31 static const unsigned short normal_i2c[] = { 0x69, I2C_CLIENT_END }; 32 32 33 - /* Insmod parameters */ 34 - I2C_CLIENT_INSMOD_1(ics932s401); 35 - 36 33 /* ICS932S401 registers */ 37 34 #define ICS932S401_REG_CFG2 0x01 38 35 #define ICS932S401_CFG1_SPREAD 0x01 ··· 108 111 static int ics932s401_remove(struct i2c_client *client); 109 112 110 113 static const struct i2c_device_id ics932s401_id[] = { 111 - { "ics932s401", ics932s401 }, 114 + { "ics932s401", 0 }, 112 115 { } 113 116 }; 114 117 MODULE_DEVICE_TABLE(i2c, ics932s401_id);
-5
include/linux/i2c.h
··· 604 604 605 605 /* These are the ones you want to use in your own drivers. Pick the one 606 606 which matches the number of devices the driver differenciates between. */ 607 - #define I2C_CLIENT_INSMOD 608 - 609 - #define I2C_CLIENT_INSMOD_1(chip1) \ 610 - enum chips { any_chip, chip1 } 611 - 612 607 #define I2C_CLIENT_INSMOD_2(chip1, chip2) \ 613 608 enum chips { any_chip, chip1, chip2 } 614 609