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

regulator: Convert i2c drivers to use .probe_new

Use the new .probe_new for i2c drivers.
These drivers do not use const struct i2c_device_id * argument, so convert
them to utilise the simplified i2c driver registration.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20200109155808.22003-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
77e29598 7eec6786

+24 -36
+2 -3
drivers/regulator/da9210-regulator.c
··· 131 131 }; 132 132 MODULE_DEVICE_TABLE(of, da9210_dt_ids); 133 133 134 - static int da9210_i2c_probe(struct i2c_client *i2c, 135 - const struct i2c_device_id *id) 134 + static int da9210_i2c_probe(struct i2c_client *i2c) 136 135 { 137 136 struct da9210 *chip; 138 137 struct device *dev = &i2c->dev; ··· 227 228 .name = "da9210", 228 229 .of_match_table = of_match_ptr(da9210_dt_ids), 229 230 }, 230 - .probe = da9210_i2c_probe, 231 + .probe_new = da9210_i2c_probe, 231 232 .id_table = da9210_i2c_id, 232 233 }; 233 234
+2 -3
drivers/regulator/da9211-regulator.c
··· 416 416 /* 417 417 * I2C driver interface functions 418 418 */ 419 - static int da9211_i2c_probe(struct i2c_client *i2c, 420 - const struct i2c_device_id *id) 419 + static int da9211_i2c_probe(struct i2c_client *i2c) 421 420 { 422 421 struct da9211 *chip; 423 422 int error, ret; ··· 525 526 .name = "da9211", 526 527 .of_match_table = of_match_ptr(da9211_dt_ids), 527 528 }, 528 - .probe = da9211_i2c_probe, 529 + .probe_new = da9211_i2c_probe, 529 530 .id_table = da9211_i2c_id, 530 531 }; 531 532
+2 -3
drivers/regulator/isl9305.c
··· 137 137 .cache_type = REGCACHE_RBTREE, 138 138 }; 139 139 140 - static int isl9305_i2c_probe(struct i2c_client *i2c, 141 - const struct i2c_device_id *id) 140 + static int isl9305_i2c_probe(struct i2c_client *i2c) 142 141 { 143 142 struct regulator_config config = { }; 144 143 struct isl9305_pdata *pdata = i2c->dev.platform_data; ··· 197 198 .name = "isl9305", 198 199 .of_match_table = of_match_ptr(isl9305_dt_ids), 199 200 }, 200 - .probe = isl9305_i2c_probe, 201 + .probe_new = isl9305_i2c_probe, 201 202 .id_table = isl9305_i2c_id, 202 203 }; 203 204
+2 -3
drivers/regulator/lp3971.c
··· 400 400 return 0; 401 401 } 402 402 403 - static int lp3971_i2c_probe(struct i2c_client *i2c, 404 - const struct i2c_device_id *id) 403 + static int lp3971_i2c_probe(struct i2c_client *i2c) 405 404 { 406 405 struct lp3971 *lp3971; 407 406 struct lp3971_platform_data *pdata = dev_get_platdata(&i2c->dev); ··· 448 449 .driver = { 449 450 .name = "LP3971", 450 451 }, 451 - .probe = lp3971_i2c_probe, 452 + .probe_new = lp3971_i2c_probe, 452 453 .id_table = lp3971_i2c_id, 453 454 }; 454 455
+2 -3
drivers/regulator/ltc3676.c
··· 301 301 return IRQ_HANDLED; 302 302 } 303 303 304 - static int ltc3676_regulator_probe(struct i2c_client *client, 305 - const struct i2c_device_id *id) 304 + static int ltc3676_regulator_probe(struct i2c_client *client) 306 305 { 307 306 struct device *dev = &client->dev; 308 307 struct regulator_init_data *init_data = dev_get_platdata(dev); ··· 379 380 .name = DRIVER_NAME, 380 381 .of_match_table = of_match_ptr(ltc3676_of_match), 381 382 }, 382 - .probe = ltc3676_regulator_probe, 383 + .probe_new = ltc3676_regulator_probe, 383 384 .id_table = ltc3676_i2c_id, 384 385 }; 385 386 module_i2c_driver(ltc3676_driver);
+2 -3
drivers/regulator/mt6311-regulator.c
··· 85 85 /* 86 86 * I2C driver interface functions 87 87 */ 88 - static int mt6311_i2c_probe(struct i2c_client *i2c, 89 - const struct i2c_device_id *id) 88 + static int mt6311_i2c_probe(struct i2c_client *i2c) 90 89 { 91 90 struct regulator_config config = { }; 92 91 struct regulator_dev *rdev; ··· 153 154 .name = "mt6311", 154 155 .of_match_table = of_match_ptr(mt6311_dt_ids), 155 156 }, 156 - .probe = mt6311_i2c_probe, 157 + .probe_new = mt6311_i2c_probe, 157 158 .id_table = mt6311_i2c_id, 158 159 }; 159 160
+2 -3
drivers/regulator/pv88060-regulator.c
··· 279 279 /* 280 280 * I2C driver interface functions 281 281 */ 282 - static int pv88060_i2c_probe(struct i2c_client *i2c, 283 - const struct i2c_device_id *id) 282 + static int pv88060_i2c_probe(struct i2c_client *i2c) 284 283 { 285 284 struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev); 286 285 struct pv88060 *chip; ··· 384 385 .name = "pv88060", 385 386 .of_match_table = of_match_ptr(pv88060_dt_ids), 386 387 }, 387 - .probe = pv88060_i2c_probe, 388 + .probe_new = pv88060_i2c_probe, 388 389 .id_table = pv88060_i2c_id, 389 390 }; 390 391
+2 -3
drivers/regulator/pv88090-regulator.c
··· 272 272 /* 273 273 * I2C driver interface functions 274 274 */ 275 - static int pv88090_i2c_probe(struct i2c_client *i2c, 276 - const struct i2c_device_id *id) 275 + static int pv88090_i2c_probe(struct i2c_client *i2c) 277 276 { 278 277 struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev); 279 278 struct pv88090 *chip; ··· 405 406 .name = "pv88090", 406 407 .of_match_table = of_match_ptr(pv88090_dt_ids), 407 408 }, 408 - .probe = pv88090_i2c_probe, 409 + .probe_new = pv88090_i2c_probe, 409 410 .id_table = pv88090_i2c_id, 410 411 }; 411 412
+2 -3
drivers/regulator/slg51000-regulator.c
··· 439 439 dev_dbg(chip->dev, "Fault log: FLT_POR\n"); 440 440 } 441 441 442 - static int slg51000_i2c_probe(struct i2c_client *client, 443 - const struct i2c_device_id *id) 442 + static int slg51000_i2c_probe(struct i2c_client *client) 444 443 { 445 444 struct device *dev = &client->dev; 446 445 struct slg51000 *chip; ··· 508 509 .driver = { 509 510 .name = "slg51000-regulator", 510 511 }, 511 - .probe = slg51000_i2c_probe, 512 + .probe_new = slg51000_i2c_probe, 512 513 .id_table = slg51000_i2c_id, 513 514 }; 514 515
+2 -3
drivers/regulator/sy8106a-regulator.c
··· 61 61 /* 62 62 * I2C driver interface functions 63 63 */ 64 - static int sy8106a_i2c_probe(struct i2c_client *i2c, 65 - const struct i2c_device_id *id) 64 + static int sy8106a_i2c_probe(struct i2c_client *i2c) 66 65 { 67 66 struct device *dev = &i2c->dev; 68 67 struct regulator_dev *rdev; ··· 140 141 .name = "sy8106a", 141 142 .of_match_table = of_match_ptr(sy8106a_i2c_of_match), 142 143 }, 143 - .probe = sy8106a_i2c_probe, 144 + .probe_new = sy8106a_i2c_probe, 144 145 .id_table = sy8106a_i2c_id, 145 146 }; 146 147
+2 -3
drivers/regulator/sy8824x.c
··· 112 112 .val_bits = 8, 113 113 }; 114 114 115 - static int sy8824_i2c_probe(struct i2c_client *client, 116 - const struct i2c_device_id *id) 115 + static int sy8824_i2c_probe(struct i2c_client *client) 117 116 { 118 117 struct device *dev = &client->dev; 119 118 struct device_node *np = dev->of_node; ··· 221 222 .name = "sy8824-regulator", 222 223 .of_match_table = of_match_ptr(sy8824_dt_ids), 223 224 }, 224 - .probe = sy8824_i2c_probe, 225 + .probe_new = sy8824_i2c_probe, 225 226 .id_table = sy8824_id, 226 227 }; 227 228 module_i2c_driver(sy8824_regulator_driver);
+2 -3
drivers/regulator/tps65132-regulator.c
··· 220 220 .wr_table = &tps65132_no_reg_table, 221 221 }; 222 222 223 - static int tps65132_probe(struct i2c_client *client, 224 - const struct i2c_device_id *client_id) 223 + static int tps65132_probe(struct i2c_client *client) 225 224 { 226 225 struct device *dev = &client->dev; 227 226 struct tps65132_regulator *tps; ··· 271 272 .driver = { 272 273 .name = "tps65132", 273 274 }, 274 - .probe = tps65132_probe, 275 + .probe_new = tps65132_probe, 275 276 .id_table = tps65132_id, 276 277 }; 277 278