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

regulator: Drop explicit initialization of struct i2c_device_id::driver_data to 0

These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://msgid.link/r/20240513080525.2353168-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Uwe Kleine-König and committed by
Mark Brown
aea07a98 1613e604

+38 -38
+2 -2
drivers/regulator/da9210-regulator.c
··· 202 202 } 203 203 204 204 static const struct i2c_device_id da9210_i2c_id[] = { 205 - {"da9210", 0}, 206 - {}, 205 + { "da9210" }, 206 + {} 207 207 }; 208 208 209 209 MODULE_DEVICE_TABLE(i2c, da9210_i2c_id);
+1 -1
drivers/regulator/lp3971.c
··· 439 439 } 440 440 441 441 static const struct i2c_device_id lp3971_i2c_id[] = { 442 - { "lp3971", 0 }, 442 + { "lp3971" }, 443 443 { } 444 444 }; 445 445 MODULE_DEVICE_TABLE(i2c, lp3971_i2c_id);
+1 -1
drivers/regulator/lp3972.c
··· 537 537 } 538 538 539 539 static const struct i2c_device_id lp3972_i2c_id[] = { 540 - { "lp3972", 0 }, 540 + { "lp3972" }, 541 541 { } 542 542 }; 543 543 MODULE_DEVICE_TABLE(i2c, lp3972_i2c_id);
+1 -1
drivers/regulator/lp8755.c
··· 430 430 } 431 431 432 432 static const struct i2c_device_id lp8755_id[] = { 433 - {LP8755_NAME, 0}, 433 + { LP8755_NAME }, 434 434 {} 435 435 }; 436 436
+1 -1
drivers/regulator/max1586.c
··· 276 276 } 277 277 278 278 static const struct i2c_device_id max1586_id[] = { 279 - { "max1586", 0 }, 279 + { "max1586" }, 280 280 { } 281 281 }; 282 282 MODULE_DEVICE_TABLE(i2c, max1586_id);
+2 -2
drivers/regulator/max20411-regulator.c
··· 145 145 MODULE_DEVICE_TABLE(of, of_max20411_match_tbl); 146 146 147 147 static const struct i2c_device_id max20411_id[] = { 148 - { "max20411", 0 }, 149 - { }, 148 + { "max20411" }, 149 + { } 150 150 }; 151 151 MODULE_DEVICE_TABLE(i2c, max20411_id); 152 152
+1 -1
drivers/regulator/max8649.c
··· 240 240 } 241 241 242 242 static const struct i2c_device_id max8649_id[] = { 243 - { "max8649", 0 }, 243 + { "max8649" }, 244 244 { } 245 245 }; 246 246 MODULE_DEVICE_TABLE(i2c, max8649_id);
+2 -2
drivers/regulator/max8893.c
··· 162 162 #endif 163 163 164 164 static const struct i2c_device_id max8893_ids[] = { 165 - { "max8893", 0 }, 166 - { }, 165 + { "max8893" }, 166 + { } 167 167 }; 168 168 MODULE_DEVICE_TABLE(i2c, max8893_ids); 169 169
+2 -2
drivers/regulator/max8952.c
··· 307 307 } 308 308 309 309 static const struct i2c_device_id max8952_ids[] = { 310 - { "max8952", 0 }, 311 - { }, 310 + { "max8952" }, 311 + { } 312 312 }; 313 313 MODULE_DEVICE_TABLE(i2c, max8952_ids); 314 314
+1 -1
drivers/regulator/mcp16502.c
··· 577 577 }; 578 578 #endif 579 579 static const struct i2c_device_id mcp16502_i2c_id[] = { 580 - { "mcp16502", 0 }, 580 + { "mcp16502" }, 581 581 { } 582 582 }; 583 583 MODULE_DEVICE_TABLE(i2c, mcp16502_i2c_id);
+2 -2
drivers/regulator/mt6311-regulator.c
··· 133 133 } 134 134 135 135 static const struct i2c_device_id mt6311_i2c_id[] = { 136 - {"mt6311", 0}, 137 - {}, 136 + { "mt6311" }, 137 + {} 138 138 }; 139 139 MODULE_DEVICE_TABLE(i2c, mt6311_i2c_id); 140 140
+4 -4
drivers/regulator/pf8x00-regulator.c
··· 596 596 MODULE_DEVICE_TABLE(of, pf8x00_dt_ids); 597 597 598 598 static const struct i2c_device_id pf8x00_i2c_id[] = { 599 - { "pf8100", 0 }, 600 - { "pf8121a", 0 }, 601 - { "pf8200", 0 }, 602 - {}, 599 + { "pf8100" }, 600 + { "pf8121a" }, 601 + { "pf8200" }, 602 + {} 603 603 }; 604 604 MODULE_DEVICE_TABLE(i2c, pf8x00_i2c_id); 605 605
+2 -2
drivers/regulator/pv88060-regulator.c
··· 360 360 } 361 361 362 362 static const struct i2c_device_id pv88060_i2c_id[] = { 363 - {"pv88060", 0}, 364 - {}, 363 + { "pv88060" }, 364 + {} 365 365 }; 366 366 MODULE_DEVICE_TABLE(i2c, pv88060_i2c_id); 367 367
+2 -2
drivers/regulator/pv88090-regulator.c
··· 381 381 } 382 382 383 383 static const struct i2c_device_id pv88090_i2c_id[] = { 384 - {"pv88090", 0}, 385 - {}, 384 + { "pv88090" }, 385 + {} 386 386 }; 387 387 MODULE_DEVICE_TABLE(i2c, pv88090_i2c_id); 388 388
+2 -2
drivers/regulator/slg51000-regulator.c
··· 497 497 } 498 498 499 499 static const struct i2c_device_id slg51000_i2c_id[] = { 500 - {"slg51000", 0}, 501 - {}, 500 + { "slg51000" }, 501 + {} 502 502 }; 503 503 MODULE_DEVICE_TABLE(i2c, slg51000_i2c_id); 504 504
+2 -2
drivers/regulator/sy8106a-regulator.c
··· 130 130 MODULE_DEVICE_TABLE(of, sy8106a_i2c_of_match); 131 131 132 132 static const struct i2c_device_id sy8106a_i2c_id[] = { 133 - { "sy8106a", 0 }, 134 - { }, 133 + { "sy8106a" }, 134 + { } 135 135 }; 136 136 MODULE_DEVICE_TABLE(i2c, sy8106a_i2c_id); 137 137
+5 -5
drivers/regulator/tps6286x-regulator.c
··· 136 136 } 137 137 138 138 static const struct i2c_device_id tps6286x_i2c_id[] = { 139 - { "tps62864", 0 }, 140 - { "tps62866", 0 }, 141 - { "tps62868", 0 }, 142 - { "tps62869", 0 }, 143 - {}, 139 + { "tps62864" }, 140 + { "tps62866" }, 141 + { "tps62868" }, 142 + { "tps62869" }, 143 + {} 144 144 }; 145 145 MODULE_DEVICE_TABLE(i2c, tps6286x_i2c_id); 146 146
+5 -5
drivers/regulator/tps6287x-regulator.c
··· 165 165 MODULE_DEVICE_TABLE(of, tps6287x_dt_ids); 166 166 167 167 static const struct i2c_device_id tps6287x_i2c_id[] = { 168 - { "tps62870", 0 }, 169 - { "tps62871", 0 }, 170 - { "tps62872", 0 }, 171 - { "tps62873", 0 }, 172 - {}, 168 + { "tps62870" }, 169 + { "tps62871" }, 170 + { "tps62872" }, 171 + { "tps62873" }, 172 + {} 173 173 }; 174 174 175 175 MODULE_DEVICE_TABLE(i2c, tps6287x_i2c_id);