]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
regulator: Drop unused assignment of platform_device_id driver data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Wed, 27 May 2026 10:47:44 +0000 (12:47 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 2 Jun 2026 15:09:23 +0000 (16:09 +0100)
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>
17 files changed:
drivers/regulator/88pm8607.c
drivers/regulator/max77686-regulator.c
drivers/regulator/max77802-regulator.c
drivers/regulator/max8997-regulator.c
drivers/regulator/mt6323-regulator.c
drivers/regulator/mt6331-regulator.c
drivers/regulator/mt6332-regulator.c
drivers/regulator/mt6358-regulator.c
drivers/regulator/mt6359-regulator.c
drivers/regulator/mt6360-regulator.c
drivers/regulator/mt6370-regulator.c
drivers/regulator/mt6380-regulator.c
drivers/regulator/mt6397-regulator.c
drivers/regulator/rt4831-regulator.c
drivers/regulator/rt5120-regulator.c
drivers/regulator/s2mpa01.c
drivers/regulator/s5m8767.c

index e6c436955e25177f5f408e84201b2b3d51d0cb04..969554725a67e34482c36f2f9ca82ac08bcd9195 100644 (file)
@@ -371,12 +371,10 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
 static const struct platform_device_id pm8607_regulator_driver_ids[] = {
        {
                .name   = "88pm860x-regulator",
-               .driver_data    = 0,
        }, {
                .name   = "88pm860x-preg",
-               .driver_data    = 0,
        },
-       { },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, pm8607_regulator_driver_ids);
 
index c7b270fd9e0cf28c764c03ec8434da6d451033d8..3a0156f4d6e7e27a1516885708380e512e1afdcf 100644 (file)
@@ -517,8 +517,8 @@ static int max77686_pmic_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id max77686_pmic_id[] = {
-       {"max77686-pmic", 0},
-       { },
+       { .name = "max77686-pmic" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, max77686_pmic_id);
 
index b2e87642bec419fe9ef76d9e6914b677e9fa40b2..4c05cc9c4bd2921f4dfb7002b271dfec4f41d78e 100644 (file)
@@ -546,8 +546,8 @@ static int max77802_pmic_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id max77802_pmic_id[] = {
-       {"max77802-pmic", 0},
-       { },
+       { .name = "max77802-pmic" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, max77802_pmic_id);
 
index e77621b6466c752480b060caf7591fc65d109d3e..e48ba694a9065988b9156d3b0168475c4aa92649 100644 (file)
@@ -1152,8 +1152,8 @@ static int max8997_pmic_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id max8997_pmic_id[] = {
-       { "max8997-pmic", 0},
-       { },
+       { .name = "max8997-pmic" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, max8997_pmic_id);
 
index b43da848a06e5e221ea40ffd0ee5a6b715872d34..bac226812b0b34a839190a1b3fea5428c6d35746 100644 (file)
@@ -401,8 +401,8 @@ static int mt6323_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6323_platform_ids[] = {
-       {"mt6323-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6323-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6323_platform_ids);
 
index 0059f88c6fd7e647b00466a6b7603cd3a9ce3ecb..eed9dda0481f386a0b52444347167be3f5830c91 100644 (file)
@@ -487,8 +487,8 @@ static int mt6331_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6331_platform_ids[] = {
-       {"mt6331-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6331-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6331_platform_ids);
 
index 8d8331a2aca5f6708edc8d5a3a231e383b48b7b3..949fde37617c1257966410f744ab9338839c6ac2 100644 (file)
@@ -402,8 +402,8 @@ static int mt6332_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6332_platform_ids[] = {
-       {"mt6332-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6332-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6332_platform_ids);
 
index 2604f674be493be13c4d698cf1046b261e1a7eec..f2bb3c1523cad0c5d075a6c5b51477f6b93d8494 100644 (file)
@@ -724,8 +724,8 @@ static int mt6358_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6358_platform_ids[] = {
-       {"mt6358-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6358-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6358_platform_ids);
 
index c8a788858824909cf5de4e5fb75b80e151d1e9d2..4a1e1bdd0e9a410882944bcad33ff2235164aeef 100644 (file)
@@ -977,8 +977,8 @@ static int mt6359_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6359_platform_ids[] = {
-       {"mt6359-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6359-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6359_platform_ids);
 
index 24cc9fc94e900a43a8bfa8c30c364cedb2b0b948..ed25e9603b2b4c6800ec5cd4ec80db558560d7ab 100644 (file)
@@ -446,8 +446,8 @@ static int mt6360_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6360_regulator_id_table[] = {
-       { "mt6360-regulator", 0 },
-       {},
+       { .name = "mt6360-regulator" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, mt6360_regulator_id_table);
 
index c2cea904b0ca97646def29dec4639f8adb4fc1c1..a4ac4a42c108c37e852f40778b02b5d4e8a4bf0d 100644 (file)
@@ -371,8 +371,8 @@ static int mt6370_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6370_devid_table[] = {
-       { "mt6370-regulator", 0},
-       {}
+       { .name = "mt6370-regulator" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, mt6370_devid_table);
 
index 83e50df7f7c3b43b29bb65d79f6bd812dcaa2d9e..da901a75137a7dffb9b48a31856d2d31ef8d0874 100644 (file)
@@ -314,8 +314,8 @@ static int mt6380_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6380_platform_ids[] = {
-       {"mt6380-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6380-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6380_platform_ids);
 
index 92a2d92f84f946a86c6f3675b555df5cc35ca358..e68df86ca4d9c60d88bf3ca208e1b464b11709eb 100644 (file)
@@ -392,8 +392,8 @@ static int mt6397_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id mt6397_platform_ids[] = {
-       {"mt6397-regulator", 0},
-       { /* sentinel */ },
+       { .name = "mt6397-regulator" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(platform, mt6397_platform_ids);
 
index dfc868a24056a1016ba8089d025c224cabc5e30b..5c47fd57fdef24220e15fe6c1d7a842b5c599859 100644 (file)
@@ -186,8 +186,8 @@ static int rt4831_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id rt4831_regulator_match[] = {
-       { "rt4831-regulator", 0 },
-       {}
+       { .name = "rt4831-regulator" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, rt4831_regulator_match);
 
index f0d3efd160d45f2b692a59358faaf073b522c360..a2a13ce2e67bc59877360c9382365d104cd1d7fa 100644 (file)
@@ -401,8 +401,8 @@ static int rt5120_regulator_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id rt5120_regulator_dev_table[] = {
-       { "rt5120-regulator", 0 },
-       {}
+       { .name = "rt5120-regulator" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, rt5120_regulator_dev_table);
 
index c22fdde67f9cce31fb89467ebd5295b43d94aed1..8171503861c1bf1eed5be488a1908e26271d02d3 100644 (file)
@@ -367,8 +367,8 @@ static int s2mpa01_pmic_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id s2mpa01_pmic_id[] = {
-       { "s2mpa01-pmic", 0},
-       { },
+       { .name = "s2mpa01-pmic" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, s2mpa01_pmic_id);
 
index fe2631378ccd9cfdced937a7c3ee5e176fa65ed0..2794245d40420c82f7df1fbf194fe16d6d0ee753 100644 (file)
@@ -916,8 +916,8 @@ static int s5m8767_pmic_probe(struct platform_device *pdev)
 }
 
 static const struct platform_device_id s5m8767_pmic_id[] = {
-       { "s5m8767-pmic", 0},
-       { },
+       { .name = "s5m8767-pmic" },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, s5m8767_pmic_id);