Skip to content

Commit aea07a9

Browse files
Uwe Kleine-Königbroonie
authored andcommitted
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>
1 parent 1613e60 commit aea07a9

18 files changed

Lines changed: 38 additions & 38 deletions

drivers/regulator/da9210-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ static int da9210_i2c_probe(struct i2c_client *i2c)
202202
}
203203

204204
static const struct i2c_device_id da9210_i2c_id[] = {
205-
{"da9210", 0},
206-
{},
205+
{ "da9210" },
206+
{}
207207
};
208208

209209
MODULE_DEVICE_TABLE(i2c, da9210_i2c_id);

drivers/regulator/lp3971.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ static int lp3971_i2c_probe(struct i2c_client *i2c)
439439
}
440440

441441
static const struct i2c_device_id lp3971_i2c_id[] = {
442-
{ "lp3971", 0 },
442+
{ "lp3971" },
443443
{ }
444444
};
445445
MODULE_DEVICE_TABLE(i2c, lp3971_i2c_id);

drivers/regulator/lp3972.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static int lp3972_i2c_probe(struct i2c_client *i2c)
537537
}
538538

539539
static const struct i2c_device_id lp3972_i2c_id[] = {
540-
{ "lp3972", 0 },
540+
{ "lp3972" },
541541
{ }
542542
};
543543
MODULE_DEVICE_TABLE(i2c, lp3972_i2c_id);

drivers/regulator/lp8755.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ static void lp8755_remove(struct i2c_client *client)
430430
}
431431

432432
static const struct i2c_device_id lp8755_id[] = {
433-
{LP8755_NAME, 0},
433+
{ LP8755_NAME },
434434
{}
435435
};
436436

drivers/regulator/max1586.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int max1586_pmic_probe(struct i2c_client *client)
276276
}
277277

278278
static const struct i2c_device_id max1586_id[] = {
279-
{ "max1586", 0 },
279+
{ "max1586" },
280280
{ }
281281
};
282282
MODULE_DEVICE_TABLE(i2c, max1586_id);

drivers/regulator/max20411-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ static const struct of_device_id of_max20411_match_tbl[] = {
145145
MODULE_DEVICE_TABLE(of, of_max20411_match_tbl);
146146

147147
static const struct i2c_device_id max20411_id[] = {
148-
{ "max20411", 0 },
149-
{ },
148+
{ "max20411" },
149+
{ }
150150
};
151151
MODULE_DEVICE_TABLE(i2c, max20411_id);
152152

drivers/regulator/max8649.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static int max8649_regulator_probe(struct i2c_client *client)
240240
}
241241

242242
static const struct i2c_device_id max8649_id[] = {
243-
{ "max8649", 0 },
243+
{ "max8649" },
244244
{ }
245245
};
246246
MODULE_DEVICE_TABLE(i2c, max8649_id);

drivers/regulator/max8893.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ MODULE_DEVICE_TABLE(of, max8893_dt_match);
162162
#endif
163163

164164
static const struct i2c_device_id max8893_ids[] = {
165-
{ "max8893", 0 },
166-
{ },
165+
{ "max8893" },
166+
{ }
167167
};
168168
MODULE_DEVICE_TABLE(i2c, max8893_ids);
169169

drivers/regulator/max8952.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ static int max8952_pmic_probe(struct i2c_client *client)
307307
}
308308

309309
static const struct i2c_device_id max8952_ids[] = {
310-
{ "max8952", 0 },
311-
{ },
310+
{ "max8952" },
311+
{ }
312312
};
313313
MODULE_DEVICE_TABLE(i2c, max8952_ids);
314314

drivers/regulator/mcp16502.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ static const struct dev_pm_ops mcp16502_pm_ops = {
577577
};
578578
#endif
579579
static const struct i2c_device_id mcp16502_i2c_id[] = {
580-
{ "mcp16502", 0 },
580+
{ "mcp16502" },
581581
{ }
582582
};
583583
MODULE_DEVICE_TABLE(i2c, mcp16502_i2c_id);

0 commit comments

Comments
 (0)