Skip to content

Commit 4079e9d

Browse files
ukleinekbroonie
authored andcommitted
regulator: Drop unused assignment of platform_device_id driver data
Several drivers explicitly set the .driver_data member of struct platform_device_id to zero without relying on that value. Drop these unused assignments. While touching these arrays unify spacing, usage of commas and use named initializers for .name. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/613cd1bed263c2bf562ee714595f6d57f442804d.1779878004.git.u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e43ffb6 commit 4079e9d

17 files changed

Lines changed: 33 additions & 35 deletions

drivers/regulator/88pm8607.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,10 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
371371
static const struct platform_device_id pm8607_regulator_driver_ids[] = {
372372
{
373373
.name = "88pm860x-regulator",
374-
.driver_data = 0,
375374
}, {
376375
.name = "88pm860x-preg",
377-
.driver_data = 0,
378376
},
379-
{ },
377+
{ }
380378
};
381379
MODULE_DEVICE_TABLE(platform, pm8607_regulator_driver_ids);
382380

drivers/regulator/max77686-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ static int max77686_pmic_probe(struct platform_device *pdev)
517517
}
518518

519519
static const struct platform_device_id max77686_pmic_id[] = {
520-
{"max77686-pmic", 0},
521-
{ },
520+
{ .name = "max77686-pmic" },
521+
{ }
522522
};
523523
MODULE_DEVICE_TABLE(platform, max77686_pmic_id);
524524

drivers/regulator/max77802-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ static int max77802_pmic_probe(struct platform_device *pdev)
546546
}
547547

548548
static const struct platform_device_id max77802_pmic_id[] = {
549-
{"max77802-pmic", 0},
550-
{ },
549+
{ .name = "max77802-pmic" },
550+
{ }
551551
};
552552
MODULE_DEVICE_TABLE(platform, max77802_pmic_id);
553553

drivers/regulator/max8997-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,8 +1152,8 @@ static int max8997_pmic_probe(struct platform_device *pdev)
11521152
}
11531153

11541154
static const struct platform_device_id max8997_pmic_id[] = {
1155-
{ "max8997-pmic", 0},
1156-
{ },
1155+
{ .name = "max8997-pmic" },
1156+
{ }
11571157
};
11581158
MODULE_DEVICE_TABLE(platform, max8997_pmic_id);
11591159

drivers/regulator/mt6323-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ static int mt6323_regulator_probe(struct platform_device *pdev)
401401
}
402402

403403
static const struct platform_device_id mt6323_platform_ids[] = {
404-
{"mt6323-regulator", 0},
405-
{ /* sentinel */ },
404+
{ .name = "mt6323-regulator" },
405+
{ /* sentinel */ }
406406
};
407407
MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
408408

drivers/regulator/mt6331-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ static int mt6331_regulator_probe(struct platform_device *pdev)
487487
}
488488

489489
static const struct platform_device_id mt6331_platform_ids[] = {
490-
{"mt6331-regulator", 0},
491-
{ /* sentinel */ },
490+
{ .name = "mt6331-regulator" },
491+
{ /* sentinel */ }
492492
};
493493
MODULE_DEVICE_TABLE(platform, mt6331_platform_ids);
494494

drivers/regulator/mt6332-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ static int mt6332_regulator_probe(struct platform_device *pdev)
402402
}
403403

404404
static const struct platform_device_id mt6332_platform_ids[] = {
405-
{"mt6332-regulator", 0},
406-
{ /* sentinel */ },
405+
{ .name = "mt6332-regulator" },
406+
{ /* sentinel */ }
407407
};
408408
MODULE_DEVICE_TABLE(platform, mt6332_platform_ids);
409409

drivers/regulator/mt6358-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ static int mt6358_regulator_probe(struct platform_device *pdev)
724724
}
725725

726726
static const struct platform_device_id mt6358_platform_ids[] = {
727-
{"mt6358-regulator", 0},
728-
{ /* sentinel */ },
727+
{ .name = "mt6358-regulator" },
728+
{ /* sentinel */ }
729729
};
730730
MODULE_DEVICE_TABLE(platform, mt6358_platform_ids);
731731

drivers/regulator/mt6359-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,8 @@ static int mt6359_regulator_probe(struct platform_device *pdev)
977977
}
978978

979979
static const struct platform_device_id mt6359_platform_ids[] = {
980-
{"mt6359-regulator", 0},
981-
{ /* sentinel */ },
980+
{ .name = "mt6359-regulator" },
981+
{ /* sentinel */ }
982982
};
983983
MODULE_DEVICE_TABLE(platform, mt6359_platform_ids);
984984

drivers/regulator/mt6360-regulator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ static int mt6360_regulator_probe(struct platform_device *pdev)
446446
}
447447

448448
static const struct platform_device_id mt6360_regulator_id_table[] = {
449-
{ "mt6360-regulator", 0 },
450-
{},
449+
{ .name = "mt6360-regulator" },
450+
{ }
451451
};
452452
MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
453453

0 commit comments

Comments
 (0)