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

mfd: 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://lore.kernel.org/r/20240510211011.2273978-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Uwe Kleine-König and committed by
Lee Jones
5e9ea43c 93411db5

+54 -54
+1 -1
drivers/mfd/88pm800.c
··· 116 116 #define PM800_CHIP_GEN_ID_NUM 0x3 117 117 118 118 static const struct i2c_device_id pm80x_id_table[] = { 119 - {"88PM800", 0}, 119 + { "88PM800" }, 120 120 {} /* NULL terminated */ 121 121 }; 122 122 MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
+1 -1
drivers/mfd/88pm805.c
··· 30 30 #include <linux/delay.h> 31 31 32 32 static const struct i2c_device_id pm80x_id_table[] = { 33 - {"88PM805", 0}, 33 + { "88PM805" }, 34 34 {} /* NULL terminated */ 35 35 }; 36 36 MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
+1 -1
drivers/mfd/88pm860x-core.c
··· 1233 1233 static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_pm_ops, pm860x_suspend, pm860x_resume); 1234 1234 1235 1235 static const struct i2c_device_id pm860x_id_table[] = { 1236 - { "88PM860x", 0 }, 1236 + { "88PM860x" }, 1237 1237 {} 1238 1238 }; 1239 1239 MODULE_DEVICE_TABLE(i2c, pm860x_id_table);
+1 -1
drivers/mfd/aat2870-core.c
··· 439 439 aat2870_i2c_resume); 440 440 441 441 static const struct i2c_device_id aat2870_i2c_id_table[] = { 442 - { "aat2870", 0 }, 442 + { "aat2870" }, 443 443 { } 444 444 }; 445 445
+1 -1
drivers/mfd/act8945a.c
··· 54 54 } 55 55 56 56 static const struct i2c_device_id act8945a_i2c_id[] = { 57 - { "act8945a", 0 }, 57 + { "act8945a" }, 58 58 {} 59 59 }; 60 60 MODULE_DEVICE_TABLE(i2c, act8945a_i2c_id);
+2 -2
drivers/mfd/as3722.c
··· 430 430 MODULE_DEVICE_TABLE(of, as3722_of_match); 431 431 432 432 static const struct i2c_device_id as3722_i2c_id[] = { 433 - { "as3722", 0 }, 434 - {}, 433 + { "as3722" }, 434 + {} 435 435 }; 436 436 MODULE_DEVICE_TABLE(i2c, as3722_i2c_id); 437 437
+12 -12
drivers/mfd/axp20x-i2c.c
··· 75 75 #endif 76 76 77 77 static const struct i2c_device_id axp20x_i2c_id[] = { 78 - { "axp152", 0 }, 79 - { "axp192", 0 }, 80 - { "axp202", 0 }, 81 - { "axp209", 0 }, 82 - { "axp221", 0 }, 83 - { "axp223", 0 }, 84 - { "axp313a", 0 }, 85 - { "axp717", 0 }, 86 - { "axp803", 0 }, 87 - { "axp806", 0 }, 88 - { "axp15060", 0 }, 89 - { }, 78 + { "axp152" }, 79 + { "axp192" }, 80 + { "axp202" }, 81 + { "axp209" }, 82 + { "axp221" }, 83 + { "axp223" }, 84 + { "axp313a" }, 85 + { "axp717" }, 86 + { "axp803" }, 87 + { "axp806" }, 88 + { "axp15060" }, 89 + { } 90 90 }; 91 91 MODULE_DEVICE_TABLE(i2c, axp20x_i2c_id); 92 92
+1 -1
drivers/mfd/bd9571mwv.c
··· 268 268 MODULE_DEVICE_TABLE(of, bd9571mwv_of_match_table); 269 269 270 270 static const struct i2c_device_id bd9571mwv_id_table[] = { 271 - { "bd9571mwv", 0 }, 271 + { "bd9571mwv" }, 272 272 { /* sentinel */ } 273 273 }; 274 274 MODULE_DEVICE_TABLE(i2c, bd9571mwv_id_table);
+1 -1
drivers/mfd/da9055-i2c.c
··· 54 54 * and CODEC, which must be different to operate together. 55 55 */ 56 56 static const struct i2c_device_id da9055_i2c_id[] = { 57 - {"da9055-pmic", 0}, 57 + { "da9055-pmic" }, 58 58 { } 59 59 }; 60 60 MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
+2 -2
drivers/mfd/lm3533-core.c
··· 614 614 } 615 615 616 616 static const struct i2c_device_id lm3533_i2c_ids[] = { 617 - { "lm3533", 0 }, 618 - { }, 617 + { "lm3533" }, 618 + { } 619 619 }; 620 620 MODULE_DEVICE_TABLE(i2c, lm3533_i2c_ids); 621 621
+1 -1
drivers/mfd/lp3943.c
··· 126 126 } 127 127 128 128 static const struct i2c_device_id lp3943_ids[] = { 129 - { "lp3943", 0 }, 129 + { "lp3943" }, 130 130 { } 131 131 }; 132 132 MODULE_DEVICE_TABLE(i2c, lp3943_ids);
+2 -2
drivers/mfd/lp873x.c
··· 68 68 MODULE_DEVICE_TABLE(of, of_lp873x_match_table); 69 69 70 70 static const struct i2c_device_id lp873x_id_table[] = { 71 - { "lp873x", 0 }, 72 - { }, 71 + { "lp873x" }, 72 + { } 73 73 }; 74 74 MODULE_DEVICE_TABLE(i2c, lp873x_id_table); 75 75
+2 -2
drivers/mfd/lp87565.c
··· 106 106 } 107 107 108 108 static const struct i2c_device_id lp87565_id_table[] = { 109 - { "lp87565-q1", 0 }, 110 - { }, 109 + { "lp87565-q1" }, 110 + { } 111 111 }; 112 112 MODULE_DEVICE_TABLE(i2c, lp87565_id_table); 113 113
+1 -1
drivers/mfd/lp8788.c
··· 216 216 } 217 217 218 218 static const struct i2c_device_id lp8788_ids[] = { 219 - {"lp8788", 0}, 219 + { "lp8788" }, 220 220 { } 221 221 }; 222 222 MODULE_DEVICE_TABLE(i2c, lp8788_ids);
+1 -1
drivers/mfd/max8907.c
··· 300 300 #endif 301 301 302 302 static const struct i2c_device_id max8907_i2c_id[] = { 303 - {"max8907", 0}, 303 + { "max8907" }, 304 304 {} 305 305 }; 306 306 MODULE_DEVICE_TABLE(i2c, max8907_i2c_id);
+2 -2
drivers/mfd/max8925-i2c.c
··· 127 127 128 128 129 129 static const struct i2c_device_id max8925_id_table[] = { 130 - { "max8925", 0 }, 131 - { }, 130 + { "max8925" }, 131 + { } 132 132 }; 133 133 134 134 static int max8925_dt_init(struct device_node *np, struct device *dev,
+1 -1
drivers/mfd/menelaus.c
··· 1230 1230 } 1231 1231 1232 1232 static const struct i2c_device_id menelaus_id[] = { 1233 - { "menelaus", 0 }, 1233 + { "menelaus" }, 1234 1234 { } 1235 1235 }; 1236 1236 MODULE_DEVICE_TABLE(i2c, menelaus_id);
+2 -2
drivers/mfd/retu-mfd.c
··· 300 300 } 301 301 302 302 static const struct i2c_device_id retu_id[] = { 303 - { "retu", 0 }, 304 - { "tahvo", 0 }, 303 + { "retu" }, 304 + { "tahvo" }, 305 305 { } 306 306 }; 307 307 MODULE_DEVICE_TABLE(i2c, retu_id);
+2 -2
drivers/mfd/stw481x.c
··· 222 222 * the structure of the I2C core. 223 223 */ 224 224 static const struct i2c_device_id stw481x_id[] = { 225 - { "stw481x", 0 }, 226 - { }, 225 + { "stw481x" }, 226 + { } 227 227 }; 228 228 MODULE_DEVICE_TABLE(i2c, stw481x_id); 229 229
+2 -2
drivers/mfd/tps6105x.c
··· 191 191 } 192 192 193 193 static const struct i2c_device_id tps6105x_id[] = { 194 - { "tps61050", 0 }, 195 - { "tps61052", 0 }, 194 + { "tps61050" }, 195 + { "tps61052" }, 196 196 { } 197 197 }; 198 198 MODULE_DEVICE_TABLE(i2c, tps6105x_id);
+1 -1
drivers/mfd/tps6507x.c
··· 103 103 } 104 104 105 105 static const struct i2c_device_id tps6507x_i2c_id[] = { 106 - { "tps6507x", 0 }, 106 + { "tps6507x" }, 107 107 { } 108 108 }; 109 109 MODULE_DEVICE_TABLE(i2c, tps6507x_i2c_id);
+1 -1
drivers/mfd/tps65086.c
··· 127 127 } 128 128 129 129 static const struct i2c_device_id tps65086_id_table[] = { 130 - { "tps65086", 0 }, 130 + { "tps65086" }, 131 131 { /* sentinel */ } 132 132 }; 133 133 MODULE_DEVICE_TABLE(i2c, tps65086_id_table);
+2 -2
drivers/mfd/tps65090.c
··· 225 225 226 226 227 227 static const struct i2c_device_id tps65090_id_table[] = { 228 - { "tps65090", 0 }, 229 - { }, 228 + { "tps65090" }, 229 + { } 230 230 }; 231 231 232 232 static struct i2c_driver tps65090_driver = {
+2 -2
drivers/mfd/tps6586x.c
··· 642 642 tps6586x_i2c_resume); 643 643 644 644 static const struct i2c_device_id tps6586x_id_table[] = { 645 - { "tps6586x", 0 }, 646 - { }, 645 + { "tps6586x" }, 646 + { } 647 647 }; 648 648 MODULE_DEVICE_TABLE(i2c, tps6586x_id_table); 649 649
+1 -1
drivers/mfd/tps65912-i2c.c
··· 50 50 } 51 51 52 52 static const struct i2c_device_id tps65912_i2c_id_table[] = { 53 - { "tps65912", 0 }, 53 + { "tps65912" }, 54 54 { /* sentinel */ } 55 55 }; 56 56 MODULE_DEVICE_TABLE(i2c, tps65912_i2c_id_table);
+3 -3
drivers/mfd/twl6040.c
··· 817 817 } 818 818 819 819 static const struct i2c_device_id twl6040_i2c_id[] = { 820 - { "twl6040", 0, }, 821 - { "twl6041", 0, }, 822 - { }, 820 + { "twl6040" }, 821 + { "twl6041" }, 822 + { } 823 823 }; 824 824 MODULE_DEVICE_TABLE(i2c, twl6040_i2c_id); 825 825
+1 -1
drivers/mfd/wl1273-core.c
··· 13 13 #define DRIVER_DESC "WL1273 FM Radio Core" 14 14 15 15 static const struct i2c_device_id wl1273_driver_id_table[] = { 16 - { WL1273_FM_DRIVER_NAME, 0 }, 16 + { WL1273_FM_DRIVER_NAME }, 17 17 { } 18 18 }; 19 19 MODULE_DEVICE_TABLE(i2c, wl1273_driver_id_table);
+3 -3
drivers/mfd/wm8350-i2c.c
··· 41 41 } 42 42 43 43 static const struct i2c_device_id wm8350_i2c_id[] = { 44 - { "wm8350", 0 }, 45 - { "wm8351", 0 }, 46 - { "wm8352", 0 }, 44 + { "wm8350" }, 45 + { "wm8351" }, 46 + { "wm8352" }, 47 47 { } 48 48 }; 49 49
+1 -1
drivers/mfd/wm8400-core.c
··· 135 135 } 136 136 137 137 static const struct i2c_device_id wm8400_i2c_id[] = { 138 - { "wm8400", 0 }, 138 + { "wm8400" }, 139 139 { } 140 140 }; 141 141